v1

latestOpenAPI 3.0.32026-07-26172157253.6 KB
Client

Generate chat completion (deprecated)

Deprecated compatibility proxy. New integrations should call https://openrouter.ai/api/v1/chat/completions directly with the provisioned OpenRouter key.

post/api/ai/chat/completion

Request body

modelstring required

OpenRouter model identifier

streamboolean

Enable streaming response via Server-Sent Events

temperaturenumber

Controls randomness in generation

maxTokensinteger

Maximum number of tokens to generate

topPnumber

Nucleus sampling parameter

thinkingboolean

Enable extended reasoning capabilities (appends :thinking to model ID if not already present). Not every model supports this, only works with Anthropic models with the :thinking suffix.

parallelToolCallsboolean

Allow the model to call multiple tools in parallel

Example request

{
  "model": "openai/gpt-4"
}

Response

Chat completion response

textstring

AI model response content