curl --request POST \
--url https://api.antarah.dev/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "a1",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"max_tokens": 2,
"max_completion_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop": "<string>",
"seed": 123,
"logit_bias": {},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
}
],
"parallel_tool_calls": true,
"response_format": {
"type": "text"
},
"prompt_cache_key": "<string>",
"logprobs": true,
"top_logprobs": 10,
"n": 123,
"modalities": [
"<string>"
],
"stream": true,
"stream_options": {
"include_usage": true
},
"reasoning": {
"max_tokens": 1,
"exclude": true,
"enabled": true
},
"thinking": true,
"include_reasoning": true,
"policy_ids": [
"<string>"
],
"user": "<string>",
"safety_identifier": "<string>",
"store": true,
"metadata": {},
"service_tier": "<string>",
"structuredOutputs": true,
"prompt_cache_retention": "<string>"
}
'import requests
url = "https://api.antarah.dev/v1/chat/completions"
payload = {
"model": "a1",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"max_tokens": 2,
"max_completion_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop": "<string>",
"seed": 123,
"logit_bias": {},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
}
}
],
"parallel_tool_calls": True,
"response_format": { "type": "text" },
"prompt_cache_key": "<string>",
"logprobs": True,
"top_logprobs": 10,
"n": 123,
"modalities": ["<string>"],
"stream": True,
"stream_options": { "include_usage": True },
"reasoning": {
"max_tokens": 1,
"exclude": True,
"enabled": True
},
"thinking": True,
"include_reasoning": True,
"policy_ids": ["<string>"],
"user": "<string>",
"safety_identifier": "<string>",
"store": True,
"metadata": {},
"service_tier": "<string>",
"structuredOutputs": True,
"prompt_cache_retention": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'a1',
messages: [{role: 'system', content: '<string>', name: '<string>'}],
max_tokens: 2,
max_completion_tokens: 2,
temperature: 1,
top_p: 0.5,
frequency_penalty: 0,
presence_penalty: 0,
stop: '<string>',
seed: 123,
logit_bias: {},
tools: [
{
type: 'function',
function: {name: '<string>', description: '<string>', parameters: {}, strict: true}
}
],
parallel_tool_calls: true,
response_format: {type: 'text'},
prompt_cache_key: '<string>',
logprobs: true,
top_logprobs: 10,
n: 123,
modalities: ['<string>'],
stream: true,
stream_options: {include_usage: true},
reasoning: {max_tokens: 1, exclude: true, enabled: true},
thinking: true,
include_reasoning: true,
policy_ids: ['<string>'],
user: '<string>',
safety_identifier: '<string>',
store: true,
metadata: {},
service_tier: '<string>',
structuredOutputs: true,
prompt_cache_retention: '<string>'
})
};
fetch('https://api.antarah.dev/v1/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://api.antarah.dev/v1/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' => 'a1',
'messages' => [
[
'role' => 'system',
'content' => '<string>',
'name' => '<string>'
]
],
'max_tokens' => 2,
'max_completion_tokens' => 2,
'temperature' => 1,
'top_p' => 0.5,
'frequency_penalty' => 0,
'presence_penalty' => 0,
'stop' => '<string>',
'seed' => 123,
'logit_bias' => [
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
]
],
'parallel_tool_calls' => true,
'response_format' => [
'type' => 'text'
],
'prompt_cache_key' => '<string>',
'logprobs' => true,
'top_logprobs' => 10,
'n' => 123,
'modalities' => [
'<string>'
],
'stream' => true,
'stream_options' => [
'include_usage' => true
],
'reasoning' => [
'max_tokens' => 1,
'exclude' => true,
'enabled' => true
],
'thinking' => true,
'include_reasoning' => true,
'policy_ids' => [
'<string>'
],
'user' => '<string>',
'safety_identifier' => '<string>',
'store' => true,
'metadata' => [
],
'service_tier' => '<string>',
'structuredOutputs' => true,
'prompt_cache_retention' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.antarah.dev/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"a1\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"max_tokens\": 2,\n \"max_completion_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop\": \"<string>\",\n \"seed\": 123,\n \"logit_bias\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"parallel_tool_calls\": true,\n \"response_format\": {\n \"type\": \"text\"\n },\n \"prompt_cache_key\": \"<string>\",\n \"logprobs\": true,\n \"top_logprobs\": 10,\n \"n\": 123,\n \"modalities\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"stream_options\": {\n \"include_usage\": true\n },\n \"reasoning\": {\n \"max_tokens\": 1,\n \"exclude\": true,\n \"enabled\": true\n },\n \"thinking\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"store\": true,\n \"metadata\": {},\n \"service_tier\": \"<string>\",\n \"structuredOutputs\": true,\n \"prompt_cache_retention\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.antarah.dev/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"a1\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"max_tokens\": 2,\n \"max_completion_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop\": \"<string>\",\n \"seed\": 123,\n \"logit_bias\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"parallel_tool_calls\": true,\n \"response_format\": {\n \"type\": \"text\"\n },\n \"prompt_cache_key\": \"<string>\",\n \"logprobs\": true,\n \"top_logprobs\": 10,\n \"n\": 123,\n \"modalities\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"stream_options\": {\n \"include_usage\": true\n },\n \"reasoning\": {\n \"max_tokens\": 1,\n \"exclude\": true,\n \"enabled\": true\n },\n \"thinking\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"store\": true,\n \"metadata\": {},\n \"service_tier\": \"<string>\",\n \"structuredOutputs\": true,\n \"prompt_cache_retention\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.antarah.dev/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"a1\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"max_tokens\": 2,\n \"max_completion_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop\": \"<string>\",\n \"seed\": 123,\n \"logit_bias\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"parallel_tool_calls\": true,\n \"response_format\": {\n \"type\": \"text\"\n },\n \"prompt_cache_key\": \"<string>\",\n \"logprobs\": true,\n \"top_logprobs\": 10,\n \"n\": 123,\n \"modalities\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"stream_options\": {\n \"include_usage\": true\n },\n \"reasoning\": {\n \"max_tokens\": 1,\n \"exclude\": true,\n \"enabled\": true\n },\n \"thinking\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"store\": true,\n \"metadata\": {},\n \"service_tier\": \"<string>\",\n \"structuredOutputs\": true,\n \"prompt_cache_retention\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "chatcmpl_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f",
"object": "chat.completion",
"created": 1793750400,
"model": "a1",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>",
"refusal": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"reasoning_content": "<string>"
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
],
"refusal": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
}
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123
},
"completion_tokens_details": {
"reasoning_tokens": 123
}
},
"system_fingerprint": null
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}Create a chat completion
curl --request POST \
--url https://api.antarah.dev/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "a1",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"max_tokens": 2,
"max_completion_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop": "<string>",
"seed": 123,
"logit_bias": {},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
}
],
"parallel_tool_calls": true,
"response_format": {
"type": "text"
},
"prompt_cache_key": "<string>",
"logprobs": true,
"top_logprobs": 10,
"n": 123,
"modalities": [
"<string>"
],
"stream": true,
"stream_options": {
"include_usage": true
},
"reasoning": {
"max_tokens": 1,
"exclude": true,
"enabled": true
},
"thinking": true,
"include_reasoning": true,
"policy_ids": [
"<string>"
],
"user": "<string>",
"safety_identifier": "<string>",
"store": true,
"metadata": {},
"service_tier": "<string>",
"structuredOutputs": true,
"prompt_cache_retention": "<string>"
}
'import requests
url = "https://api.antarah.dev/v1/chat/completions"
payload = {
"model": "a1",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"max_tokens": 2,
"max_completion_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop": "<string>",
"seed": 123,
"logit_bias": {},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
}
}
],
"parallel_tool_calls": True,
"response_format": { "type": "text" },
"prompt_cache_key": "<string>",
"logprobs": True,
"top_logprobs": 10,
"n": 123,
"modalities": ["<string>"],
"stream": True,
"stream_options": { "include_usage": True },
"reasoning": {
"max_tokens": 1,
"exclude": True,
"enabled": True
},
"thinking": True,
"include_reasoning": True,
"policy_ids": ["<string>"],
"user": "<string>",
"safety_identifier": "<string>",
"store": True,
"metadata": {},
"service_tier": "<string>",
"structuredOutputs": True,
"prompt_cache_retention": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'a1',
messages: [{role: 'system', content: '<string>', name: '<string>'}],
max_tokens: 2,
max_completion_tokens: 2,
temperature: 1,
top_p: 0.5,
frequency_penalty: 0,
presence_penalty: 0,
stop: '<string>',
seed: 123,
logit_bias: {},
tools: [
{
type: 'function',
function: {name: '<string>', description: '<string>', parameters: {}, strict: true}
}
],
parallel_tool_calls: true,
response_format: {type: 'text'},
prompt_cache_key: '<string>',
logprobs: true,
top_logprobs: 10,
n: 123,
modalities: ['<string>'],
stream: true,
stream_options: {include_usage: true},
reasoning: {max_tokens: 1, exclude: true, enabled: true},
thinking: true,
include_reasoning: true,
policy_ids: ['<string>'],
user: '<string>',
safety_identifier: '<string>',
store: true,
metadata: {},
service_tier: '<string>',
structuredOutputs: true,
prompt_cache_retention: '<string>'
})
};
fetch('https://api.antarah.dev/v1/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://api.antarah.dev/v1/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' => 'a1',
'messages' => [
[
'role' => 'system',
'content' => '<string>',
'name' => '<string>'
]
],
'max_tokens' => 2,
'max_completion_tokens' => 2,
'temperature' => 1,
'top_p' => 0.5,
'frequency_penalty' => 0,
'presence_penalty' => 0,
'stop' => '<string>',
'seed' => 123,
'logit_bias' => [
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
]
],
'parallel_tool_calls' => true,
'response_format' => [
'type' => 'text'
],
'prompt_cache_key' => '<string>',
'logprobs' => true,
'top_logprobs' => 10,
'n' => 123,
'modalities' => [
'<string>'
],
'stream' => true,
'stream_options' => [
'include_usage' => true
],
'reasoning' => [
'max_tokens' => 1,
'exclude' => true,
'enabled' => true
],
'thinking' => true,
'include_reasoning' => true,
'policy_ids' => [
'<string>'
],
'user' => '<string>',
'safety_identifier' => '<string>',
'store' => true,
'metadata' => [
],
'service_tier' => '<string>',
'structuredOutputs' => true,
'prompt_cache_retention' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.antarah.dev/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"a1\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"max_tokens\": 2,\n \"max_completion_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop\": \"<string>\",\n \"seed\": 123,\n \"logit_bias\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"parallel_tool_calls\": true,\n \"response_format\": {\n \"type\": \"text\"\n },\n \"prompt_cache_key\": \"<string>\",\n \"logprobs\": true,\n \"top_logprobs\": 10,\n \"n\": 123,\n \"modalities\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"stream_options\": {\n \"include_usage\": true\n },\n \"reasoning\": {\n \"max_tokens\": 1,\n \"exclude\": true,\n \"enabled\": true\n },\n \"thinking\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"store\": true,\n \"metadata\": {},\n \"service_tier\": \"<string>\",\n \"structuredOutputs\": true,\n \"prompt_cache_retention\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.antarah.dev/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"a1\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"max_tokens\": 2,\n \"max_completion_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop\": \"<string>\",\n \"seed\": 123,\n \"logit_bias\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"parallel_tool_calls\": true,\n \"response_format\": {\n \"type\": \"text\"\n },\n \"prompt_cache_key\": \"<string>\",\n \"logprobs\": true,\n \"top_logprobs\": 10,\n \"n\": 123,\n \"modalities\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"stream_options\": {\n \"include_usage\": true\n },\n \"reasoning\": {\n \"max_tokens\": 1,\n \"exclude\": true,\n \"enabled\": true\n },\n \"thinking\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"store\": true,\n \"metadata\": {},\n \"service_tier\": \"<string>\",\n \"structuredOutputs\": true,\n \"prompt_cache_retention\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.antarah.dev/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"a1\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"max_tokens\": 2,\n \"max_completion_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop\": \"<string>\",\n \"seed\": 123,\n \"logit_bias\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n }\n ],\n \"parallel_tool_calls\": true,\n \"response_format\": {\n \"type\": \"text\"\n },\n \"prompt_cache_key\": \"<string>\",\n \"logprobs\": true,\n \"top_logprobs\": 10,\n \"n\": 123,\n \"modalities\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"stream_options\": {\n \"include_usage\": true\n },\n \"reasoning\": {\n \"max_tokens\": 1,\n \"exclude\": true,\n \"enabled\": true\n },\n \"thinking\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"store\": true,\n \"metadata\": {},\n \"service_tier\": \"<string>\",\n \"structuredOutputs\": true,\n \"prompt_cache_retention\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "chatcmpl_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f",
"object": "chat.completion",
"created": 1793750400,
"model": "a1",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>",
"refusal": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"reasoning_content": "<string>"
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
],
"refusal": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
}
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123
},
"completion_tokens_details": {
"reasoning_tokens": 123
}
},
"system_fingerprint": null
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}Authorizations
ak_… project API key (or x-api-key)
Body
Rejected with 400 unsupported_parameter: n ≠ 1, audio, modalities other than ["text"], prediction, web_search_options, functions, function_call, prompt_logprobs, cache_salt, and any field not listed here.
Public model ID, e.g. a1 (A-05)
1"a1"
1 - 10000 elements- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
1…the model's max_output_tokens
x >= 11…the model's max_output_tokens
x >= 10 <= x <= 20 <= x <= 1-2 <= x <= 2-2 <= x <= 2Show child attributes
Show child attributes
128Show child attributes
Show child attributes
none, auto, required - Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Must be one of the model's reasoning_efforts
none, minimal, low, medium, high, xhigh, max, null 5120 <= x <= 20Only 1
Only ["text"]
Default false
Usage is always metered; the final usage chunk is sent only when include_usage is true
Show child attributes
Show child attributes
OpenRouter-style; mapped to reasoning_effort
Show child attributes
Show child attributes
Mapped to reasoning_effort
false strips reasoning_content from the output
Antara extension: published policies to add for this request
201 - 12051264Show child attributes
Show child attributes
Response
application/json when stream is false; otherwise text/event-stream: data: <ChatCompletionChunk> events, then data: [DONE]
^chatcmpl_[0-9a-f]{32}$"chatcmpl_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"
chat.completion Unix seconds
1793750400
"a1"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
