curl --request GET \
--url https://api.example.com/async/chat/completions/{api_request} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"model": "<string>",
"created_at": 123,
"status": "CREATED",
"started_at": 123,
"completed_at": 123,
"response": {
"id": "<string>",
"model": "<string>",
"created": 123,
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"reasoning_steps": [
{
"thought": "<string>",
"type": "<string>",
"web_search": {
"search_results": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
],
"search_keywords": [
"<string>"
]
},
"fetch_url_content": {
"contents": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
]
},
"execute_python": {
"code": "<string>",
"result": "<string>"
}
}
],
"tool_calls": [
{
"id": "<string>",
"type": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"tool_call_id": "<string>"
},
"delta": {
"role": "system",
"content": "<string>",
"reasoning_steps": [
{
"thought": "<string>",
"type": "<string>",
"web_search": {
"search_results": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
],
"search_keywords": [
"<string>"
]
},
"fetch_url_content": {
"contents": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
]
},
"execute_python": {
"code": "<string>",
"result": "<string>"
}
}
],
"tool_calls": [
{
"id": "<string>",
"type": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"tool_call_id": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"cost": {
"input_tokens_cost": 123,
"output_tokens_cost": 123,
"total_cost": 123,
"reasoning_tokens_cost": 123,
"request_cost": 123,
"citation_tokens_cost": 123,
"search_queries_cost": 123
},
"search_context_size": "<string>",
"citation_tokens": 123,
"num_search_queries": 123,
"reasoning_tokens": 123
},
"object": "chat.completion",
"citations": [
"<string>"
],
"search_results": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
],
"type": "message",
"status": "PENDING"
},
"failed_at": 123,
"error_message": "<string>"
}Retrieve the response for a given asynchronous chat completion request.
curl --request GET \
--url https://api.example.com/async/chat/completions/{api_request} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"model": "<string>",
"created_at": 123,
"status": "CREATED",
"started_at": 123,
"completed_at": 123,
"response": {
"id": "<string>",
"model": "<string>",
"created": 123,
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"reasoning_steps": [
{
"thought": "<string>",
"type": "<string>",
"web_search": {
"search_results": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
],
"search_keywords": [
"<string>"
]
},
"fetch_url_content": {
"contents": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
]
},
"execute_python": {
"code": "<string>",
"result": "<string>"
}
}
],
"tool_calls": [
{
"id": "<string>",
"type": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"tool_call_id": "<string>"
},
"delta": {
"role": "system",
"content": "<string>",
"reasoning_steps": [
{
"thought": "<string>",
"type": "<string>",
"web_search": {
"search_results": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
],
"search_keywords": [
"<string>"
]
},
"fetch_url_content": {
"contents": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
]
},
"execute_python": {
"code": "<string>",
"result": "<string>"
}
}
],
"tool_calls": [
{
"id": "<string>",
"type": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"tool_call_id": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"cost": {
"input_tokens_cost": 123,
"output_tokens_cost": 123,
"total_cost": 123,
"reasoning_tokens_cost": 123,
"request_cost": 123,
"citation_tokens_cost": 123,
"search_queries_cost": 123
},
"search_context_size": "<string>",
"citation_tokens": 123,
"num_search_queries": 123,
"reasoning_tokens": 123
},
"object": "chat.completion",
"citations": [
"<string>"
],
"search_results": [
{
"title": "<string>",
"url": "<string>",
"date": "<string>",
"last_updated": "<string>",
"snippet": "",
"source": "web"
}
],
"type": "message",
"status": "PENDING"
},
"failed_at": 123,
"error_message": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful Response
Status enum for async processing.
CREATED, IN_PROGRESS, COMPLETED, FAILED Show child attributes
Was this page helpful?