Create a Response
POST/v1/responses
AuthorizationLink to section
Your Mixedbread API key as a bearer token. Format: `Bearer YOUR_API_KEY`.
Request BodyLink to section
toast-1Public model ID.
System-level instructions for this response. New instructions replace instructions from a previous response.
autoControls function selection. Use `auto`, `none`, `required`, or force a function with `{ type: 'function', name: '...' }`.
truePersist the response so it can be retrieved and continued later. Set to `false` to prevent response content from being stored for later retrieval.
ID of a stored response to continue. Send only the new input for the next turn.
falseReturn semantic server-sent events such as `response.output_text.delta` and a terminal `response.completed` event.
Maximum tokens to generate for the response.
Constraints
trueAllow the model to request multiple function calls in one response.
Up to 16 string key-value pairs. Keys may contain up to 64 characters and values up to 512 characters.
Response BodyLink to section
Unique response ID, prefixed with `resp_`.
responseUnix timestamp when the response was created.
Unix timestamp when generation completed.
Error code and message when the response failed.
Why the response is incomplete, such as reaching `max_output_tokens`.
The stable public model ID, `toast-1`.
Whether parallel function calls were allowed.
Function selection mode used for the response.
Function definitions configured for the response.
The previous response continued by this response.
Input, output, cached, reasoning, and total token counts.
Metadata copied from the request.
Short display title for the stored conversation.
from openai import OpenAI
client = OpenAI(
base_url="https://api.mixedbread.com/v1",
api_key="YOUR_API_KEY",
)
response = client.responses.create(
model="toast-1",
input="What is a search agent?",
)
print(response.output_text){
"id": "resp_abc123",
"object": "response",
"created_at": 1786622400,
"status": "completed",
"completed_at": 1786622401,
"error": null,
"incomplete_details": null,
"instructions": null,
"model": "toast-1",
"output": [
{
"type": "message",
"id": "msg_abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"annotations": [],
"text": "A search agent plans queries, gathers evidence with tools, and synthesizes an answer.",
"logprobs": []
}
]
}
],
"parallel_tool_calls": true,
"temperature": null,
"tool_choice": "auto",
"tools": [],
"top_p": null,
"background": false,
"max_output_tokens": null,
"previous_response_id": null,
"reasoning": null,
"service_tier": "default",
"text": null,
"truncation": "disabled",
"usage": {
"input_tokens": 15,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 19,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 34
},
"metadata": null,
"safety_identifier": null,
"prompt_cache_key": null,
"user": null,
"title": "What is a search agent?"
}Stored response lifecycleLink to section
Responses created with store: true can also use the OpenAI-compatible
retrieve, delete, and input-items endpoints. These operations use the same REST
paths and OpenAI SDK method names. Use the Mixedbread base URL and API key shown
in the examples above.
| Operation | REST endpoint | Python | TypeScript | Supported query parameters |
|---|---|---|---|---|
| Retrieve a response | GET /v1/responses/{response_id} | client.responses.retrieve(response_id) | client.responses.retrieve(responseId) | stream, starting_after |
| Delete a response | DELETE /v1/responses/{response_id} | client.responses.delete(response_id) | client.responses.delete(responseId) | None |
| List input items | GET /v1/responses/{response_id}/input_items | client.responses.input_items.list(response_id) | client.responses.inputItems.list(responseId) | limit, order, after |
Mixedbread supports the OpenAI lifecycle shape for text messages and client-executed function items. OpenAI options or item types not documented on this page are not supported. Deleting a stored response also deletes its persisted conversation chain.