Inference APIs

Mixlayer provides OpenAI-compatible APIs for chat, text generation, responses, embeddings, and model discovery.

See Choosing an Inference API for guidance on when to use Chat Completions or Responses.

The base URL is:

https://models.mixlayer.ai/v1

Use your preferred OpenAI-compatible client. Point it at the base URL above, provide your Mixlayer API key, and keep using the methods you already know.

Connect with an OpenAI-compatible client

1import os
2from openai import OpenAI
3
4client = OpenAI(
5 api_key=os.environ["MIXLAYER_API_KEY"],
6 base_url="https://models.mixlayer.ai/v1",
7)
8
9response = client.chat.completions.create(
10 model="qwen/qwen3.5-4b-free",
11 messages=[{"role": "user", "content": "Hello!"}],
12)
13
14print(response.choices[0].message.content)

Existing applications can usually switch to Mixlayer by changing only the API key and base URL. See Client Libraries for TypeScript, Rust, streaming, and curl examples.

Authentication

Create an API key in the Mixlayer console and provide it as a Bearer token:

Authorization: Bearer $MIXLAYER_API_KEY

Available Inference APIs

APIEndpoint
Responses
Generate model responses from text or typed input items.
POST /v1/responses
Responses WebSocket
Run multi-turn Responses API generation over WebSocket.
GET /v1/responses
Chat Completions
Generate assistant messages from a conversation.
POST /v1/chat/completions
Embeddings
Create embedding vectors from text or token input.
POST /v1/embeddings

Use a model identifier from the Models catalog in inference requests. For a guided first request, follow the Quickstart.