Create a chat completion
Changed onCreate a chat completion, optionally grounded in the caller's stores.
Supports the OpenAI Chat Completions API subset: a message list, function tools, streaming via server-sent events, and persistence via store. A request without hosted tools is one generation over exactly what was sent: no instructions, tools, or turns are added. The previous_completion_id groups stored turns into a conversation and restores the full model context; callers normally send only the new suffix. (previous_messages and terminal_tool_name are deprecated: resend the full edited history in messages instead.) Retrieval is opt-in: declare the hosted store tools (store_search, store_grep, store_list_chunks, store_metadata_facets, list_stores) in tools to let the model search, grep, filter, and read the caller's stores server-side, scoped by each declaration. Those executions are reported in the hosted_tool_calls extension field (and as extra streaming chunks), with chunk results included only for the requested include keys. A model call to a caller-declared function tool ends the completion with tool_calls on the choice message (finish_reason tool_calls); execute the functions and continue the conversation by appending the assistant message and the matching tool messages to the next request.
Request
- Base URLhttps://api.mixedbread.com
- URLhttps://api.mixedbread.com/v1/chat/completions
- AuthHTTP bearer
Request body
Example request
{
"tools": [
{
"filters": {
"all": [
{
"key": "price",
"operator": "gt",
"value": "100"
},
{
"key": "color",
"operator": "eq",
"value": "red"
}
],
"any": [
{
"key": "price",
"operator": "gt",
"value": "100"
},
{
"key": "color",
"operator": "eq",
"value": "red"
}
],
"none": [
{
"key": "price",
"operator": "gt",
"value": "100"
},
{
"key": "color",
"operator": "eq",
"value": "red"
}
]
}
}
]
}Response
The generated chat completion, or a server-sent event stream of completion chunks
Changes
- info
the
/request property's min was decreased from16.00to1.00 - info
the
/request property's min was decreased from16.00to1.00
- info
- breaking
the
////request property type changed fromobjectto no type - breaking
the
/////request property type changed fromobjectto no type - breaking
added to the
/////response propertyoneOflist for the response status - breaking
added to the
/////response propertyoneOflist for the response status - breaking
the
/////response's property type changed fromobjectto no type for status - breaking
the
/////response's property type changed fromobjectto no type for status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - breaking
removed the required property
//////from the response with the status - warning
removed the request property
///// - warning
removed the request property
///// - warning
removed the request property
///// - warning
removed the request property
///// - warning
removed the request property
///// - warning
removed the request property
///// - warning
removed the request property
////// - warning
removed the request property
////// - warning
removed the request property
////// - warning
removed the request property
////// - warning
removed the request property
////// - warning
removed the request property
////// - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - info
added discriminator to
////request property - info
added discriminator to
/////request property - info
added to the
////request propertyoneOflist - info
added to the
/////request propertyoneOflist - info
added discriminator to
/////response property for the response status - info
added discriminator to
/////response property for the response status
- breaking