Skip to main content

POST /v1/chat/completions

The primary chat endpoint. Fully OpenAI compatible. Base URL

Minimal example

Authentication

Streaming

You receive standard OpenAI SSE chunks ending in data: [DONE].

Tool calling (function calling)

Request:
The assistant message may contain tool_calls. You then send back a tool role message with tool_call_id. Openference passes these through (or converts) automatically.

Reasoning / thinking

Many models return chain-of-thought in a separate reasoning_content field (alongside content). To control thinking, send standard OpenAI or Anthropic fields — Openference translates them for the model you chose:
Either reasoning_effort or thinking alone is usually sufficient. Use GET /v1/models to read reasoning.supported and reasoning.supported_efforts for each model ID — effort vocabularies differ (for example DeepSeek Pro supports max and high; DeepSeek Flash also supports low). Reasoning tokens are billed at the model’s output rate. See Reasoning metadata on GET /v1/models for the full model reference table.

Temperature, max_tokens, top_p, etc.

All standard sampling parameters are forwarded.

Format conversion

If the upstream for your chosen model uses Anthropic or Gemini, Openference converts the request and response shapes transparently. You can send OpenAI format to a Claude model and get back OpenAI-shaped output.

Model restrictions & 403

If the key is restricted, only allowed models accept traffic.

See also