Completions Response Format
BLACKBOX AI uses OpenRouter under the hood and it normalizes the schema across models and providers to comply with the OpenAI Chat API. This means thatchoices is always an array, even if the model only returns one completion. Each choice will contain a delta property if a stream was requested and a message property otherwise. This makes it easier to use the same code for all models.
Here’s the response schema as a TypeScript type:
TypeScript
Finish Reason
OpenRouter normalizes each model’sfinish_reason to one of the following values: tool_calls, stop, length, content_filter, error.
Some models and providers may have additional finish reasons. The raw finish_reason string returned by the model is available via the native_finish_reason property.