Overview
a21e exposes an OpenAI-compatible/v1/chat/completions endpoint. If your application already uses the OpenAI SDK, you can switch to a21e by changing two lines — the base URL and API key.
Setup
Model mapping
Themodel parameter maps to a21e’s tier system:
What’s different from raw OpenAI
When you use a21e’s OpenAI-compatible endpoint, your request gets the full a21e pipeline:- Prompt synthesis — your message is enhanced with curated techniques
- Memory injection — relevant memories from past sessions are applied
- Workspace context — preferences, persona, and repo context are included
- Quality scoring — outputs are scored for continuous improvement
Streaming
Streaming is supported via the standardstream: true parameter: