curl --request POST \
--url https://api.antarah.dev/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "a1",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
],
"parallel_tool_calls": true,
"max_tool_calls": 2,
"reasoning": {},
"text": {
"format": {
"type": "text"
}
},
"prompt_cache_key": "<string>",
"include": [
"<string>"
],
"stream": true,
"include_reasoning": true,
"policy_ids": [
"<string>"
],
"background": true,
"store": true,
"metadata": {},
"user": "<string>",
"safety_identifier": "<string>",
"service_tier": "<string>",
"client_metadata": {}
}
'import requests
url = "https://api.antarah.dev/v1/responses"
payload = {
"model": "a1",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
}
],
"parallel_tool_calls": True,
"max_tool_calls": 2,
"reasoning": {},
"text": { "format": { "type": "text" } },
"prompt_cache_key": "<string>",
"include": ["<string>"],
"stream": True,
"include_reasoning": True,
"policy_ids": ["<string>"],
"background": True,
"store": True,
"metadata": {},
"user": "<string>",
"safety_identifier": "<string>",
"service_tier": "<string>",
"client_metadata": {}
}
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',
input: '<string>',
instructions: '<string>',
max_output_tokens: 2,
temperature: 1,
top_p: 0.5,
tools: [
{
type: 'function',
name: '<string>',
description: '<string>',
parameters: {},
strict: true
}
],
parallel_tool_calls: true,
max_tool_calls: 2,
reasoning: {},
text: {format: {type: 'text'}},
prompt_cache_key: '<string>',
include: ['<string>'],
stream: true,
include_reasoning: true,
policy_ids: ['<string>'],
background: true,
store: true,
metadata: {},
user: '<string>',
safety_identifier: '<string>',
service_tier: '<string>',
client_metadata: {}
})
};
fetch('https://api.antarah.dev/v1/responses', 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/responses",
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',
'input' => '<string>',
'instructions' => '<string>',
'max_output_tokens' => 2,
'temperature' => 1,
'top_p' => 0.5,
'tools' => [
[
'type' => 'function',
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
],
'parallel_tool_calls' => true,
'max_tool_calls' => 2,
'reasoning' => [
],
'text' => [
'format' => [
'type' => 'text'
]
],
'prompt_cache_key' => '<string>',
'include' => [
'<string>'
],
'stream' => true,
'include_reasoning' => true,
'policy_ids' => [
'<string>'
],
'background' => true,
'store' => true,
'metadata' => [
],
'user' => '<string>',
'safety_identifier' => '<string>',
'service_tier' => '<string>',
'client_metadata' => [
]
]),
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/responses"
payload := strings.NewReader("{\n \"model\": \"a1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 2,\n \"reasoning\": {},\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"prompt_cache_key\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"background\": true,\n \"store\": true,\n \"metadata\": {},\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"service_tier\": \"<string>\",\n \"client_metadata\": {}\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/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"a1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 2,\n \"reasoning\": {},\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"prompt_cache_key\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"background\": true,\n \"store\": true,\n \"metadata\": {},\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"service_tier\": \"<string>\",\n \"client_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.antarah.dev/v1/responses")
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 \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 2,\n \"reasoning\": {},\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"prompt_cache_key\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"background\": true,\n \"store\": true,\n \"metadata\": {},\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"service_tier\": \"<string>\",\n \"client_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f",
"object": "response",
"created_at": 1793750400,
"status": "in_progress",
"error": {
"code": "<string>",
"message": "<string>"
},
"incomplete_details": {
"reason": "<string>"
},
"instructions": "<string>",
"max_output_tokens": 123,
"max_tool_calls": 123,
"model": "a1",
"output": [
{
"type": "message",
"id": "<string>",
"status": "in_progress",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
"<unknown>"
],
"logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
}
]
}
],
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": "none",
"summary": null
},
"store": false,
"temperature": 123,
"text": {
"format": {
"type": "text"
}
},
"tool_choice": "none",
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
],
"top_p": 123,
"truncation": "auto",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
},
"metadata": {},
"user": "<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>"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "invalid_api_key",
"request_id": "<string>"
}
}Create a response
curl --request POST \
--url https://api.antarah.dev/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "a1",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
],
"parallel_tool_calls": true,
"max_tool_calls": 2,
"reasoning": {},
"text": {
"format": {
"type": "text"
}
},
"prompt_cache_key": "<string>",
"include": [
"<string>"
],
"stream": true,
"include_reasoning": true,
"policy_ids": [
"<string>"
],
"background": true,
"store": true,
"metadata": {},
"user": "<string>",
"safety_identifier": "<string>",
"service_tier": "<string>",
"client_metadata": {}
}
'import requests
url = "https://api.antarah.dev/v1/responses"
payload = {
"model": "a1",
"input": "<string>",
"instructions": "<string>",
"max_output_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
}
],
"parallel_tool_calls": True,
"max_tool_calls": 2,
"reasoning": {},
"text": { "format": { "type": "text" } },
"prompt_cache_key": "<string>",
"include": ["<string>"],
"stream": True,
"include_reasoning": True,
"policy_ids": ["<string>"],
"background": True,
"store": True,
"metadata": {},
"user": "<string>",
"safety_identifier": "<string>",
"service_tier": "<string>",
"client_metadata": {}
}
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',
input: '<string>',
instructions: '<string>',
max_output_tokens: 2,
temperature: 1,
top_p: 0.5,
tools: [
{
type: 'function',
name: '<string>',
description: '<string>',
parameters: {},
strict: true
}
],
parallel_tool_calls: true,
max_tool_calls: 2,
reasoning: {},
text: {format: {type: 'text'}},
prompt_cache_key: '<string>',
include: ['<string>'],
stream: true,
include_reasoning: true,
policy_ids: ['<string>'],
background: true,
store: true,
metadata: {},
user: '<string>',
safety_identifier: '<string>',
service_tier: '<string>',
client_metadata: {}
})
};
fetch('https://api.antarah.dev/v1/responses', 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/responses",
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',
'input' => '<string>',
'instructions' => '<string>',
'max_output_tokens' => 2,
'temperature' => 1,
'top_p' => 0.5,
'tools' => [
[
'type' => 'function',
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
],
'parallel_tool_calls' => true,
'max_tool_calls' => 2,
'reasoning' => [
],
'text' => [
'format' => [
'type' => 'text'
]
],
'prompt_cache_key' => '<string>',
'include' => [
'<string>'
],
'stream' => true,
'include_reasoning' => true,
'policy_ids' => [
'<string>'
],
'background' => true,
'store' => true,
'metadata' => [
],
'user' => '<string>',
'safety_identifier' => '<string>',
'service_tier' => '<string>',
'client_metadata' => [
]
]),
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/responses"
payload := strings.NewReader("{\n \"model\": \"a1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 2,\n \"reasoning\": {},\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"prompt_cache_key\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"background\": true,\n \"store\": true,\n \"metadata\": {},\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"service_tier\": \"<string>\",\n \"client_metadata\": {}\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/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"a1\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 2,\n \"reasoning\": {},\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"prompt_cache_key\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"background\": true,\n \"store\": true,\n \"metadata\": {},\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"service_tier\": \"<string>\",\n \"client_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.antarah.dev/v1/responses")
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 \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"parallel_tool_calls\": true,\n \"max_tool_calls\": 2,\n \"reasoning\": {},\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"prompt_cache_key\": \"<string>\",\n \"include\": [\n \"<string>\"\n ],\n \"stream\": true,\n \"include_reasoning\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"background\": true,\n \"store\": true,\n \"metadata\": {},\n \"user\": \"<string>\",\n \"safety_identifier\": \"<string>\",\n \"service_tier\": \"<string>\",\n \"client_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f",
"object": "response",
"created_at": 1793750400,
"status": "in_progress",
"error": {
"code": "<string>",
"message": "<string>"
},
"incomplete_details": {
"reason": "<string>"
},
"instructions": "<string>",
"max_output_tokens": 123,
"max_tool_calls": 123,
"model": "a1",
"output": [
{
"type": "message",
"id": "<string>",
"status": "in_progress",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
"<unknown>"
],
"logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
}
]
}
],
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": "none",
"summary": null
},
"store": false,
"temperature": 123,
"text": {
"format": {
"type": "text"
}
},
"tool_choice": "none",
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
],
"top_p": 123,
"truncation": "auto",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
},
"metadata": {},
"user": "<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>"
}
}{
"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: previous_response_id, conversation, background: true, built-in tools, include values other than the two listed, item references, and any field not listed here.
Public model ID, e.g. a1 (A-05)
1"a1"
1…the model's max_output_tokens
x >= 10 <= x <= 20 <= x <= 1128- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
Show child attributes
Show child attributes
none, auto, required x >= 1effort must be one of the model's reasoning_efforts
Show child attributes
Show child attributes
Show child attributes
Show child attributes
auto, disabled, null 512Default false
false strips reasoning items from the output
Antara extension: published policies to add for this request
201 - 120Only false
Always treated as false; the response echoes store: false
Show child attributes
Show child attributes
51264Show child attributes
Show child attributes
Response
application/json when stream is false; otherwise text/event-stream: event: <type> + data: <ResponseStreamEvent>, ending with response.completed or response.incomplete (response.failed on a failure after the headers)
^resp_[0-9a-f]{32}$"resp_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"
response Unix seconds
1793750400
in_progress, completed, incomplete, failed Show child attributes
Show child attributes
Show child attributes
Show child attributes
"a1"
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
false Show child attributes
Show child attributes
none, auto, required Show child attributes
Show child attributes
auto, disabled Show child attributes
Show child attributes
Show child attributes
Show child attributes
