Skip to main content
POST
/
v1
/
chat
/
completions
Chat completions
curl --request POST \
  --url https://api.example.com/v1/chat/completions \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "audio": {
    "format": "<string>",
    "voice": "<string>"
  },
  "frequency_penalty": {},
  "logit_bias": {},
  "logprobs": {},
  "max_completion_tokens": {},
  "max_tokens": {},
  "messages": [
    {
      "content": "Explain nordlys routing.",
      "role": "user"
    }
  ],
  "metadata": {},
  "modalities": [
    "<string>"
  ],
  "model": "claude-opus-4-5",
  "models": [
    "<string>"
  ],
  "n": {},
  "parallel_tool_calls": {},
  "prediction": {
    "content": {
      "OfArrayOfContentParts": [
        {
          "text": "<string>",
          "type": "<string>"
        }
      ],
      "OfString": {}
    },
    "type": "<string>"
  },
  "presence_penalty": {},
  "provider_configs": {},
  "provider_data_collection": "<string>",
  "provider_enforce_distillable_text": true,
  "provider_ignore": [
    "<string>"
  ],
  "provider_max_completion_price": 123,
  "provider_max_image_price": 123,
  "provider_max_prompt_price": 123,
  "provider_max_request_price": 123,
  "provider_only": [
    "<string>"
  ],
  "provider_order": [
    "<string>"
  ],
  "provider_quantizations": [
    "<string>"
  ],
  "provider_require_parameters": true,
  "provider_sort": "<string>",
  "provider_zdr": true,
  "reasoning_effort": "<string>",
  "response_format": {
    "OfJSONObject": {
      "type": "<string>"
    },
    "OfJSONSchema": {
      "json_schema": {
        "description": {},
        "name": "<string>",
        "schema": "<unknown>",
        "strict": {}
      },
      "type": "<string>"
    },
    "OfText": {
      "type": "<string>"
    }
  },
  "seed": {},
  "service_tier": "<string>",
  "stop": {
    "OfString": {},
    "OfStringArray": [
      "<string>"
    ]
  },
  "store": {},
  "stream": false,
  "stream_options": {
    "include_obfuscation": {},
    "include_usage": {}
  },
  "temperature": {},
  "tool_choice": {
    "OfAllowedTools": {
      "allowed_tools": {
        "mode": "<string>",
        "tools": [
          {}
        ]
      },
      "type": "<string>"
    },
    "OfAuto": {},
    "OfCustomToolChoice": {
      "custom": {
        "name": "<string>"
      },
      "type": "<string>"
    },
    "OfFunctionToolChoice": {
      "function": {
        "name": "<string>"
      },
      "type": "<string>"
    }
  },
  "tools": [
    {
      "OfCustom": {
        "custom": {
          "description": {},
          "format": {
            "OfGrammar": {
              "grammar": {
                "definition": "<string>",
                "syntax": "<string>"
              },
              "type": "<string>"
            },
            "OfText": {
              "type": "<string>"
            }
          },
          "name": "<string>"
        },
        "type": "<string>"
      },
      "OfFunction": {
        "function": {
          "description": {},
          "name": "<string>",
          "parameters": {},
          "strict": {}
        },
        "type": "<string>"
      }
    }
  ],
  "top_logprobs": {},
  "top_p": {},
  "user": {},
  "web_search_options": {
    "search_context_size": "<string>",
    "user_location": {
      "approximate": {
        "city": {},
        "country": {},
        "region": {},
        "timezone": {}
      },
      "type": "<string>"
    }
  }
}
'
{
  "choices": [
    {
      "finish_reason": "<string>",
      "index": 123,
      "logprobs": {
        "content": [
          {
            "bytes": [
              123
            ],
            "logprob": 123,
            "token": "<string>",
            "top_logprobs": [
              {
                "bytes": [
                  123
                ],
                "logprob": 123,
                "token": "<string>"
              }
            ]
          }
        ],
        "refusal": [
          {
            "bytes": [
              123
            ],
            "logprob": 123,
            "token": "<string>",
            "top_logprobs": [
              {
                "bytes": [
                  123
                ],
                "logprob": 123,
                "token": "<string>"
              }
            ]
          }
        ]
      },
      "message": {
        "annotations": [
          {
            "type": "<string>",
            "url_citation": {
              "end_index": 123,
              "start_index": 123,
              "title": "<string>",
              "url": "<string>"
            }
          }
        ],
        "audio": {
          "data": "<string>",
          "expires_at": 123,
          "id": "<string>",
          "transcript": "<string>"
        },
        "content": "<string>",
        "function_call": {
          "arguments": "<string>",
          "name": "<string>"
        },
        "refusal": "<string>",
        "role": "<string>",
        "tool_calls": [
          {
            "custom": {
              "input": "<string>",
              "name": "<string>"
            },
            "function": {
              "arguments": "<string>",
              "name": "<string>"
            },
            "id": "<string>",
            "type": "<string>"
          }
        ]
      }
    }
  ],
  "created": 123,
  "id": "<string>",
  "model": "<string>",
  "object": "<string>",
  "service_tier": "<string>",
  "system_fingerprint": "<string>",
  "usage": {
    "completion_tokens": 123,
    "completion_tokens_details": {
      "accepted_prediction_tokens": 123,
      "audio_tokens": 123,
      "reasoning_tokens": 123,
      "rejected_prediction_tokens": 123
    },
    "prompt_tokens": 123,
    "prompt_tokens_details": {
      "audio_tokens": 123,
      "cached_tokens": 123
    },
    "total_tokens": 123
  }
}

Authorizations

X-API-Key
string
header
required

Body

application/json
audio
object
frequency_penalty
object
logit_bias
object
logprobs
object
max_completion_tokens
object
max_tokens
object
messages
object[] | null
Example:
[
{
"content": "Explain nordlys routing.",
"role": "user"
}
]
metadata
object
modalities
string[] | null
model
string
Example:

"claude-opus-4-5"

models
string[] | null
n
object
parallel_tool_calls
object
prediction
object
presence_penalty
object
provider_configs
object
provider_data_collection
string
provider_enforce_distillable_text
boolean | null
provider_ignore
string[] | null
provider_max_completion_price
number | null
provider_max_image_price
number | null
provider_max_prompt_price
number | null
provider_max_request_price
number | null
provider_only
string[] | null
provider_order
string[] | null
provider_quantizations
string[] | null
provider_require_parameters
boolean
provider_sort
string
provider_zdr
boolean | null
reasoning_effort
string
response_format
object
seed
object
service_tier
string
stop
object
store
object
stream
boolean
Example:

false

stream_options
object
temperature
object
tool_choice
object
tools
object[] | null
top_logprobs
object
top_p
object
user
object
web_search_options
object

Response

200 - application/json

OK

choices
object[] | null
created
integer<int64>
id
string
model
string
object
string
service_tier
string
system_fingerprint
string
usage
object