Create a chat completion
POST/v1/chat/completions
OpenAI Chat Completions, on any model in the catalog. Send model (an alias) and messages; set stream: true for text/event-stream chunks terminated by data: [DONE]. Parameters the target model cannot take are dropped and named in X-MindsHub-Dropped-Params; response_format is the one refused with a 400 instead. The response's model is the resolved provider model, not the alias.
Request
Responses
- 200
- 400
- 401
- 402
- 403
- 404
- 429
- 503
The completion. Exactly one choice.
Response Headers
Parameters adjusted to the model's range, as name=requested>applied. Absent when nothing was clamped.
Comma-separated parameters the target model could not take and that were dropped. Absent when nothing was dropped.
Malformed body, or a parameter the target model cannot honor and that is refused rather than dropped (param_not_supported, invalid_param, max_tokens_exceeded, model_not_configured).
Missing or invalid Authorization: Bearer mdb_… (invalid_credentials).
The wallet is empty and this model is not covered by included tokens (wallet_empty).
Response Headers
Machine-readable denial reason (rate_limited, included_allowance_exhausted, wallet_empty).
Relative console URL where credit can be added.
The key is valid but not permitted here (permission_denied).
Unknown model alias (model_not_found).
Too fast (rate_limited, retry after Retry-After) or included tokens exhausted with no payment method (included_allowance_exhausted, wait for X-MindsHub-Reset-At).
Response Headers
Seconds to wait before retrying.
Machine-readable denial reason (rate_limited, included_allowance_exhausted, wallet_empty).
ISO-8601 instant the allowance resets.
The authorization gate is unavailable (policy_unavailable). Retry.