Create a Response
Create an OpenAI-compatible response with text input or client-executed function tools.
ApiKeyAuthAuthorizationBearer <token>Api key to access Mixedbreads API
application/json- body
OpenAI-compatible response parameters
model?Model"toast-1"input*string|array<||||||||>instructions?string|nulltools?array<||||||||||||>tool_choice?|||||||||||"auto"store?Storetrueprevious_response_id?string|nullcontext_management?|nullstream?Streamfalsestream_options?|nulltemperature?|nulltop_p?|nullmax_output_tokens?|nullmax_tool_calls?|nullparallel_tool_calls?Parallel Tool Callstruemetadata?|nullinclude?array<string>|nulltext?|nullbackground?Backgroundfalsetruncation?Truncation"disabled""auto""disabled"reasoning?|nullservice_tier?|nullsafety_identifier?|nullprompt_cache_key?string|nulluser?string|nullclient_metadata?|nullThe generated response, or a semantic server-sent event stream
application/json- response
A completed or in-progress OpenAI-compatible Response object.
id*Idobject?Object"response"created_at*Created Atstatus*Status"completed""failed""in_progress""cancelled""queued""incomplete"completed_at?number|nullerror?|nullincomplete_details?|nullinstructions?string|nullmodel?Model"toast-1"output?array<|||||>parallel_tool_calls?Parallel Tool Callstruetemperature?number|nulltool_choice?||"auto"tools?array<||>top_p?number|nullbackground?Backgroundfalsemax_output_tokens?integer|nullmax_tool_calls?integer|nullprevious_response_id?string|nullreasoning?|nullservice_tier?Service Tier"default""auto""default""flex""scale""priority"text?|nulltruncation?Truncation"disabled""auto""disabled"usage?|nullmetadata?|nullsafety_identifier?string|nullprompt_cache_key?string|nulluser?string|nullhosted_tool_calls?array<|||||||||>hosted_tools?array<|||||||||>tool_tickets?array<>context_management?|nulltitle?string|nullfrom 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 lifecycle
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.