Introduction
Glexir is an OpenAI-compatible API for text generation, embeddings and speech-to-text. You send the same requests you would send to OpenAI, using OpenAI model IDs, to a Glexir base URL with a Glexir API key. You pay from prepaid credit.
Use the TypeScript SDK, @glexir/sdk, or any OpenAI-compatible client pointed at that URL.
A first request
The Quickstart walks you through getting a key and running this.
What you can use
Every endpoint lives under https://api.glexir.com/v1 and takes the same request and response shapes as OpenAI's API.
| Area | Endpoints | SDK |
|---|---|---|
| Responses | POST /responses, GET /responses/{id}, DELETE /responses/{id}, POST /responses/{id}/cancel, GET /responses/{id}/input_items, POST /responses/input_tokens, POST /responses/compact | glexir.responses |
| Conversations | /conversations and /conversations/{id}/items | glexir.conversations |
| Chat Completions | POST /chat/completions, plus stored completions (GET, POST, DELETE /chat/completions/{id}, GET /chat/completions/{id}/messages) | glexir.chat.completions |
| Embeddings | POST /embeddings | glexir.embeddings |
| Audio | POST /audio/transcriptions, POST /audio/translations | glexir.audio |
| Files | /files with purpose user_data or batch | glexir.files |
| Batches | /batches | glexir.batches |
| Models | GET /models, GET /models/{model} | glexir.models |
Models
Glexir sells three kinds of model:
- Text models: IDs starting with
gpt-orofollowed by a digit, for examplegpt-6-luna. - Embedding models: IDs starting with
text-embedding, for exampletext-embedding-3-small. - Transcription models: IDs containing
transcribeorwhisper, for examplegpt-transcribe.
A model must also be in the Glexir price book. GET /models lists only the models you can use. Each kind of model works only on its own endpoints: an embedding model on /responses is rejected with 400 and code model_not_found. Models whose ID contains -pro, deep-research, computer-use or codex-max work only on /responses, not /chat/completions.
What is not available
Glexir covers text, embeddings and speech-to-text. These parts of OpenAI's API are not available:
- Endpoints not listed above, such as image generation, text-to-speech, realtime, video, moderations, Assistants, fine-tuning, vector stores and uploads. They return
404with codeunknown_endpoint. - Image, text-to-speech, realtime, video, moderation and fine-tuned (
ft:) models. Sending one to a supported endpoint returns400with codemodel_not_found. - Hosted tools: web search, file search, code interpreter, MCP, image generation, shell, computer use, apply patch and tool search. You can use
functionandcustomtools, andnamespacetools that contain only those. - Audio input in
/responsesor/chat/completions, and audio output from/chat/completions. Use/audio/transcriptionsfor audio. - Dashboard prompt templates (the
promptparameter on/responses). Sendinstructionsinstead.
A request that uses a hosted tool, audio input or output, or prompt is rejected with 400, type invalid_request_error and code unsupported_on_glexir. param points at the field that caused it:
Pricing
You pay OpenAI list price for usage. There is no markup. Usage is charged against prepaid credit, so you add credit before you send requests.
Larger top-ups earn bonus credit. A single top-up of $50 or more gets a volume bonus, rising to 45% off list price on the largest top-ups. See Pricing for every model's price and the full bonus table, and Credits & billing for how credit works.
Next steps
- Quickstart: create a key and send your first request.
- Authentication: how keys work and how to keep them safe.
- Client configuration: every SDK client option.
- Use any OpenAI SDK: call Glexir from Python or another language.