completions
curl --request POST \
--url https://ai.pmock.com/api/ai/chat/completions \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"messages": [
"<unknown>"
],
"metadata": {},
"logprobs": true,
"n": 123,
"seed": 123,
"stop": "<unknown>",
"stream": true,
"temperature": 123,
"tools": [
"<unknown>"
],
"store": true,
"reasoning_effort": "<string>",
"frequency_penalty": 123,
"logit_bias": {},
"top_logprobs": 123,
"max_completion_tokens": 123,
"presence_penalty": 123,
"service_tier": "<string>",
"stream_options": {
"include_obfuscation": true
},
"top_p": 123,
"tool_choice": "<unknown>",
"extra": {}
}
'import requests
url = "https://ai.pmock.com/api/ai/chat/completions"
payload = {
"model": "<string>",
"messages": ["<unknown>"],
"metadata": {},
"logprobs": True,
"n": 123,
"seed": 123,
"stop": "<unknown>",
"stream": True,
"temperature": 123,
"tools": ["<unknown>"],
"store": True,
"reasoning_effort": "<string>",
"frequency_penalty": 123,
"logit_bias": {},
"top_logprobs": 123,
"max_completion_tokens": 123,
"presence_penalty": 123,
"service_tier": "<string>",
"stream_options": { "include_obfuscation": True },
"top_p": 123,
"tool_choice": "<unknown>",
"extra": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
messages: ['<unknown>'],
metadata: {},
logprobs: true,
n: 123,
seed: 123,
stop: '<unknown>',
stream: true,
temperature: 123,
tools: ['<unknown>'],
store: true,
reasoning_effort: '<string>',
frequency_penalty: 123,
logit_bias: {},
top_logprobs: 123,
max_completion_tokens: 123,
presence_penalty: 123,
service_tier: '<string>',
stream_options: {include_obfuscation: true},
top_p: 123,
tool_choice: '<unknown>',
extra: {}
})
};
fetch('https://ai.pmock.com/api/ai/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ai.pmock.com/api/ai/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'messages' => [
'<unknown>'
],
'metadata' => [
],
'logprobs' => true,
'n' => 123,
'seed' => 123,
'stop' => '<unknown>',
'stream' => true,
'temperature' => 123,
'tools' => [
'<unknown>'
],
'store' => true,
'reasoning_effort' => '<string>',
'frequency_penalty' => 123,
'logit_bias' => [
],
'top_logprobs' => 123,
'max_completion_tokens' => 123,
'presence_penalty' => 123,
'service_tier' => '<string>',
'stream_options' => [
'include_obfuscation' => true
],
'top_p' => 123,
'tool_choice' => '<unknown>',
'extra' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ai.pmock.com/api/ai/chat/completions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"messages\": [\n \"<unknown>\"\n ],\n \"metadata\": {},\n \"logprobs\": true,\n \"n\": 123,\n \"seed\": 123,\n \"stop\": \"<unknown>\",\n \"stream\": true,\n \"temperature\": 123,\n \"tools\": [\n \"<unknown>\"\n ],\n \"store\": true,\n \"reasoning_effort\": \"<string>\",\n \"frequency_penalty\": 123,\n \"logit_bias\": {},\n \"top_logprobs\": 123,\n \"max_completion_tokens\": 123,\n \"presence_penalty\": 123,\n \"service_tier\": \"<string>\",\n \"stream_options\": {\n \"include_obfuscation\": true\n },\n \"top_p\": 123,\n \"tool_choice\": \"<unknown>\",\n \"extra\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ai.pmock.com/api/ai/chat/completions")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"messages\": [\n \"<unknown>\"\n ],\n \"metadata\": {},\n \"logprobs\": true,\n \"n\": 123,\n \"seed\": 123,\n \"stop\": \"<unknown>\",\n \"stream\": true,\n \"temperature\": 123,\n \"tools\": [\n \"<unknown>\"\n ],\n \"store\": true,\n \"reasoning_effort\": \"<string>\",\n \"frequency_penalty\": 123,\n \"logit_bias\": {},\n \"top_logprobs\": 123,\n \"max_completion_tokens\": 123,\n \"presence_penalty\": 123,\n \"service_tier\": \"<string>\",\n \"stream_options\": {\n \"include_obfuscation\": true\n },\n \"top_p\": 123,\n \"tool_choice\": \"<unknown>\",\n \"extra\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.pmock.com/api/ai/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"messages\": [\n \"<unknown>\"\n ],\n \"metadata\": {},\n \"logprobs\": true,\n \"n\": 123,\n \"seed\": 123,\n \"stop\": \"<unknown>\",\n \"stream\": true,\n \"temperature\": 123,\n \"tools\": [\n \"<unknown>\"\n ],\n \"store\": true,\n \"reasoning_effort\": \"<string>\",\n \"frequency_penalty\": 123,\n \"logit_bias\": {},\n \"top_logprobs\": 123,\n \"max_completion_tokens\": 123,\n \"presence_penalty\": 123,\n \"service_tier\": \"<string>\",\n \"stream_options\": {\n \"include_obfuscation\": true\n },\n \"top_p\": 123,\n \"tool_choice\": \"<unknown>\",\n \"extra\": {}\n}"
response = http.request(request)
puts response.read_bodyCompatible
completions
completions
POST
/
ai
/
chat
/
completions
completions
curl --request POST \
--url https://ai.pmock.com/api/ai/chat/completions \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"messages": [
"<unknown>"
],
"metadata": {},
"logprobs": true,
"n": 123,
"seed": 123,
"stop": "<unknown>",
"stream": true,
"temperature": 123,
"tools": [
"<unknown>"
],
"store": true,
"reasoning_effort": "<string>",
"frequency_penalty": 123,
"logit_bias": {},
"top_logprobs": 123,
"max_completion_tokens": 123,
"presence_penalty": 123,
"service_tier": "<string>",
"stream_options": {
"include_obfuscation": true
},
"top_p": 123,
"tool_choice": "<unknown>",
"extra": {}
}
'import requests
url = "https://ai.pmock.com/api/ai/chat/completions"
payload = {
"model": "<string>",
"messages": ["<unknown>"],
"metadata": {},
"logprobs": True,
"n": 123,
"seed": 123,
"stop": "<unknown>",
"stream": True,
"temperature": 123,
"tools": ["<unknown>"],
"store": True,
"reasoning_effort": "<string>",
"frequency_penalty": 123,
"logit_bias": {},
"top_logprobs": 123,
"max_completion_tokens": 123,
"presence_penalty": 123,
"service_tier": "<string>",
"stream_options": { "include_obfuscation": True },
"top_p": 123,
"tool_choice": "<unknown>",
"extra": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
messages: ['<unknown>'],
metadata: {},
logprobs: true,
n: 123,
seed: 123,
stop: '<unknown>',
stream: true,
temperature: 123,
tools: ['<unknown>'],
store: true,
reasoning_effort: '<string>',
frequency_penalty: 123,
logit_bias: {},
top_logprobs: 123,
max_completion_tokens: 123,
presence_penalty: 123,
service_tier: '<string>',
stream_options: {include_obfuscation: true},
top_p: 123,
tool_choice: '<unknown>',
extra: {}
})
};
fetch('https://ai.pmock.com/api/ai/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ai.pmock.com/api/ai/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'messages' => [
'<unknown>'
],
'metadata' => [
],
'logprobs' => true,
'n' => 123,
'seed' => 123,
'stop' => '<unknown>',
'stream' => true,
'temperature' => 123,
'tools' => [
'<unknown>'
],
'store' => true,
'reasoning_effort' => '<string>',
'frequency_penalty' => 123,
'logit_bias' => [
],
'top_logprobs' => 123,
'max_completion_tokens' => 123,
'presence_penalty' => 123,
'service_tier' => '<string>',
'stream_options' => [
'include_obfuscation' => true
],
'top_p' => 123,
'tool_choice' => '<unknown>',
'extra' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ai.pmock.com/api/ai/chat/completions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"messages\": [\n \"<unknown>\"\n ],\n \"metadata\": {},\n \"logprobs\": true,\n \"n\": 123,\n \"seed\": 123,\n \"stop\": \"<unknown>\",\n \"stream\": true,\n \"temperature\": 123,\n \"tools\": [\n \"<unknown>\"\n ],\n \"store\": true,\n \"reasoning_effort\": \"<string>\",\n \"frequency_penalty\": 123,\n \"logit_bias\": {},\n \"top_logprobs\": 123,\n \"max_completion_tokens\": 123,\n \"presence_penalty\": 123,\n \"service_tier\": \"<string>\",\n \"stream_options\": {\n \"include_obfuscation\": true\n },\n \"top_p\": 123,\n \"tool_choice\": \"<unknown>\",\n \"extra\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ai.pmock.com/api/ai/chat/completions")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"messages\": [\n \"<unknown>\"\n ],\n \"metadata\": {},\n \"logprobs\": true,\n \"n\": 123,\n \"seed\": 123,\n \"stop\": \"<unknown>\",\n \"stream\": true,\n \"temperature\": 123,\n \"tools\": [\n \"<unknown>\"\n ],\n \"store\": true,\n \"reasoning_effort\": \"<string>\",\n \"frequency_penalty\": 123,\n \"logit_bias\": {},\n \"top_logprobs\": 123,\n \"max_completion_tokens\": 123,\n \"presence_penalty\": 123,\n \"service_tier\": \"<string>\",\n \"stream_options\": {\n \"include_obfuscation\": true\n },\n \"top_p\": 123,\n \"tool_choice\": \"<unknown>\",\n \"extra\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.pmock.com/api/ai/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"messages\": [\n \"<unknown>\"\n ],\n \"metadata\": {},\n \"logprobs\": true,\n \"n\": 123,\n \"seed\": 123,\n \"stop\": \"<unknown>\",\n \"stream\": true,\n \"temperature\": 123,\n \"tools\": [\n \"<unknown>\"\n ],\n \"store\": true,\n \"reasoning_effort\": \"<string>\",\n \"frequency_penalty\": 123,\n \"logit_bias\": {},\n \"top_logprobs\": 123,\n \"max_completion_tokens\": 123,\n \"presence_penalty\": 123,\n \"service_tier\": \"<string>\",\n \"stream_options\": {\n \"include_obfuscation\": true\n },\n \"top_p\": 123,\n \"tool_choice\": \"<unknown>\",\n \"extra\": {}\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200
OK
