Responses [BETA]
A request object for generating model responses and controlling router behavior. This object contains suggested parameters to generate a response from the specified model. Many parameters are optional, and you may include other parameters as required. Not all providers support the same parameters. Unsupported parameters can cause requests to fail or limit the providers able to process them.
The provider preference for handling the request.
The providers that are allowed to be used for the completion.
["mistral","scaleway"]Whether to consider only providers based and regulated withing the EU. Even when false, all our endpoints are GDPR compliant.
falseWhether to allow quantized endpoints.
trueWhether to use only ZDR providers.
Whether to allow model fallback when a model is currently unavailable.
The providers that are allowed to be used for the completion.
["mistral-small-2506","mistral-small-2503"]The model to use for the response.
gpt-oss-120bThe text, messages, or tool outputs to send to the model.
Tell me a short story.Instructions that guide the model's response.
The maximum number of tokens to generate.
Controls randomness in the output.
Controls output diversity using nucleus sampling.
Whether to stream response events.
falseTools the model may call.
Controls which tool the model may call.
Whether the model may call tools in parallel.
The previous response to continue from.
Reasoning configuration for supported models.
Text output configuration.
A model response.
The unique identifier for the response.
resp_1234567890The type of object returned.
responseThe Unix timestamp when the response was created.
1715155200The current response status.
completedThe provider that generated the response.
nebiusThe model that generated the response.
gpt-oss-120bThe output items generated by the model.
The combined text generated by the model, when available.
Internal server error.
POST /v1/responses HTTP/1.1
Host: api.cortecs.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 530
{
"preference": "speed",
"allowed_providers": [
"mistral",
"scaleway"
],
"eu_native": false,
"allow_quantization": true,
"allow_zero_data_retention": true,
"enable_model_fallback": true,
"fallbacks": [
"mistral-small-2506",
"mistral-small-2503"
],
"model": "gpt-oss-120b",
"input": "Tell me a short story.",
"instructions": "text",
"max_output_tokens": 1,
"temperature": 1,
"top_p": 1,
"stream": false,
"tools": [
{}
],
"tool_choice": "text",
"parallel_tool_calls": true,
"previous_response_id": "text",
"reasoning": {},
"text": {},
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}{
"id": "resp_1234567890",
"object": "response",
"created_at": 1715155200,
"status": "completed",
"provider": "nebius",
"model": "gpt-oss-120b",
"output": [
{}
],
"output_text": "text",
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1
}
}Last updated