Client Libraries
Mixlayer exposes OpenAI-compatible Chat Completions and Responses APIs at https://models.mixlayer.ai/v1. Any client library that supports either API can use Mixlayer — point it at the Mixlayer base URL and pass your Mixlayer API key.
You can create an API key from the Mixlayer console.
Installation
curl
Python
TypeScript
Rust
No installation required — curl is preinstalled on most systems.
Basic chat completion
curl
Python
TypeScript
Rust
file=chat.sh
Streaming
Pass stream: true to receive tokens as Server-Sent Events as they’re generated.
curl
Python
TypeScript
Rust
file=stream.sh
See Chat Completions for the full list of supported request parameters and the streaming event shape.
Vercel AI SDK
You can also use Mixlayer via the OpenAI-compatible provider in the Vercel AI SDK.
file=route.ts