A valid request URL is required to generate request examples{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"name": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"tool_call_id": "<string>"
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"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,
"accepted_prediction_tokens": 123,
"rejected_prediction_tokens": 123
},
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123
},
"system_fingerprint": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Create Chat Completion
Creates a model response for the given chat conversation.
Supports OpenAI, Anthropic, Google, and Bedrock providers via
provider resolution based on the model name.
Set stream: true for Server-Sent Events streaming.
A valid request URL is required to generate request examples{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"name": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"tool_call_id": "<string>"
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"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,
"accepted_prediction_tokens": 123,
"rejected_prediction_tokens": 123
},
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123
},
"system_fingerprint": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key passed as a Bearer token.
Body
Model identifier (e.g. gpt-4o, claude-3-sonnet).
List of messages comprising the conversation.
Show child attributes
Show child attributes
Sampling temperature (0–2).
Maximum number of tokens to generate.
Nucleus sampling parameter.
Frequency penalty (−2.0 to 2.0).
Presence penalty (−2.0 to 2.0).
Stop sequences.
Whether to stream partial responses via SSE.
List of tools the model may call.
Show child attributes
Show child attributes
Controls which tool is called. Can be "none", "auto",
or an object like {"type": "function", "function": {"name": "my_fn"}}.
Show child attributes
Show child attributes
Seed for deterministic sampling.
End-user identifier for abuse monitoring.
Number of completions to generate.
Whether to return log probabilities.
Number of most likely tokens to return (0–20).
Show child attributes
Show child attributes
Was this page helpful?

