Skip to main content
POST
Create Async Chat Completion
Sonar Chat Completions has been superseded by the Agent API (POST /v1/agent). This page is kept as a legacy reference. Asynchronous Sonar requests are no longer supported; use background mode in the Agent API instead. For ranked web search results with page text and no generated answer, use the Search API (POST /search). See the Sonar to Agent API migration guide.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for creating an asynchronous chat completion

request
ApiChatCompletionsRequest · object
required

The chat completion request to execute asynchronously

idempotency_key
string | null

Unique key to prevent duplicate requests

Response

Successful Response

id
string
required

Unique identifier for the async request

model
string
required

Model used for the request

created_at
integer
required

Unix timestamp when the request was created

status
enum<string>
required

Current processing status of the request

Available options:
CREATED,
IN_PROGRESS,
COMPLETED,
FAILED
started_at
integer | null

Unix timestamp when processing started

completed_at
integer | null

Unix timestamp when processing completed

response
CompletionResponse · object | null
failed_at
integer | null

Unix timestamp when the request failed (if applicable)

error_message
string | null

Error message if the request failed