Skip to navigation

Create a chat completion

View as Markdown
Send messages to any available language model and receive replies. Compatible with the official OpenAI SDKs, change only the base URL and key. Find model IDs in the console catalog. Supports streaming, tool calling and JSON mode.

Authentication

AuthorizationBearer

Mindrift API key (sk_…). Create scoped keys in console → API Keys.

Request

This endpoint expects an object.
modelstringRequired

Model ID, e.g. deepseek-v4-flash.

messageslist of objectsRequired
streambooleanOptionalDefaults to false
stream_optionsobjectOptional
temperaturedoubleOptional
max_tokensintegerOptional
Max tokens to generate.
max_completion_tokensintegerOptional
top_pdoubleOptional
frequency_penaltydoubleOptional
presence_penaltydoubleOptional
stopstring or list of stringsOptional
response_formatobjectOptional
toolslist of objectsOptional
OpenAI function tools.
tool_choicestring or map from strings to anyOptional

OpenAI tool_choice.

seedintegerOptional
reasoning_effortenumOptional
Reasoning tier, when supported by the model.
Allowed values:
nintegerOptional>=1
Completions to generate.
userstringOptional

Your end-user id (optional).

Response

Chat completion (or SSE stream when stream: true).

idstring
objectstring
createdinteger
modelstring
Echoes the requested model ID.
choiceslist of objects
usageobject

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error