Choosing an Inference API
Mixlayer supports both the OpenAI-compatible Chat Completions and Responses APIs. They run the same catalog of generation models, but use different request shapes and conversation patterns.
Start with Chat Completions for broad client compatibility. Choose Responses when your application benefits from typed input and output items, stored continuation, hosted tools, or Responses-style streaming.
Chat Completions
Chat Completions uses a messages array containing system, user, assistant, and tool turns.
Choose it when:
- You are connecting an existing OpenAI-compatible application or library.
- Your application already stores and resends conversation history.
- You want the most widely supported API shape across third-party tools.
- You need standard function calling, structured output, vision, reasoning, or streaming without Responses-specific state.
Your application owns conversation state. To continue a conversation, send the previous messages again with the next request.
Responses
Responses accepts a string or typed input items and returns typed output items and events.
Choose it when:
- You need
function_callandfunction_call_outputitems. - You want to continue from a stored response with
previous_response_id. - You use server-side tools such as web search.
- You want typed streaming events or the Responses WebSocket endpoint.
- Your client already implements the OpenAI Responses API.
Stored continuation is optional. Send store: true to make a response available for a later previous_response_id, subject to your organization’s data-retention policy.
Feature comparison
Both APIs support function tools, structured text output, vision, and reasoning on compatible models. The item shapes differ, so follow the examples for the API you choose.
Compatibility boundaries
OpenAI compatibility describes the request and response shape; it does not mean every OpenAI field or tool type is supported. Use the generated API Reference as the source of truth for accepted fields and values. Unsupported input can be rejected even when an OpenAI client successfully connects.
See Client Libraries for configuration examples and Tool Calling for the function-call loop in both APIs.
Embeddings use a separate endpoint; see Generating embeddings.