Chat Completions
Send an OpenAI-compatible chat completions request to a Relace-hosted model.
https://models.relace.ai/v1 with your Relace API key.
Models
Authorizations
Relace API key Authorization header using the Bearer scheme.
Body
OpenAI-compatible chat completions request
OpenAI-compatible request. Supported sampling parameters vary slightly by model; the List Models endpoint reports supported_sampling_parameters and supported_features per model.
ID of the hosted model to use, e.g. deepseek-ai/DeepSeek-V4-Flash-0731 or moonshotai/kimi-k3. See the List Models endpoint for the full catalog.
The conversation so far, as OpenAI-format message objects with role and content.
If true, tokens are sent as server-sent events as they are generated. Token usage is always reported in the final chunk of the stream.
Maximum number of tokens to generate. Reasoning tokens count toward this limit, so set a generous budget.
Sampling temperature. Higher values make output more random.
Nucleus sampling: only tokens within the top top_p probability mass are considered.
Only the top_k most likely tokens are considered at each step.
Up to 4 sequences at which generation stops.
Penalizes tokens by how often they have appeared so far. Range -2 to 2.
Penalizes tokens that have appeared at all so far. Range -2 to 2.
Multiplicative penalty on repeated tokens. Values above 1 discourage repetition.
OpenAI-format function tool definitions the model may call.
Controls tool use: none, auto, required, or a specific tool.
Set to {"type": "json_object"} for JSON mode. Kimi K3 only.
Response
Chat completion generated