GlexirDocs
Dashboard

Get started

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.

Output
https://api.glexir.com/v1

Use the TypeScript SDK, @glexir/sdk, or any OpenAI-compatible client pointed at that URL.

A first request

import Glexir from "@glexir/sdk";

const glexir = new Glexir({ apiKey: process.env.GLEXIR_API_KEY });

const response = await glexir.responses.create({
  model: "gpt-6-luna",
  input: "Name three planets.",
});

console.log(response.output_text);

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.

AreaEndpointsSDK
ResponsesPOST /responses, GET /responses/{id}, DELETE /responses/{id}, POST /responses/{id}/cancel, GET /responses/{id}/input_items, POST /responses/input_tokens, POST /responses/compactglexir.responses
Conversations/conversations and /conversations/{id}/itemsglexir.conversations
Chat CompletionsPOST /chat/completions, plus stored completions (GET, POST, DELETE /chat/completions/{id}, GET /chat/completions/{id}/messages)glexir.chat.completions
EmbeddingsPOST /embeddingsglexir.embeddings
AudioPOST /audio/transcriptions, POST /audio/translationsglexir.audio
Files/files with purpose user_data or batchglexir.files
Batches/batchesglexir.batches
ModelsGET /models, GET /models/{model}glexir.models

Models

Glexir sells three kinds of model:

  • Text models: IDs starting with gpt- or o followed by a digit, for example gpt-6-luna.
  • Embedding models: IDs starting with text-embedding, for example text-embedding-3-small.
  • Transcription models: IDs containing transcribe or whisper, for example gpt-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 404 with code unknown_endpoint.
  • Image, text-to-speech, realtime, video, moderation and fine-tuned (ft:) models. Sending one to a supported endpoint returns 400 with code model_not_found.
  • Hosted tools: web search, file search, code interpreter, MCP, image generation, shell, computer use, apply patch and tool search. You can use function and custom tools, and namespace tools that contain only those.
  • Audio input in /responses or /chat/completions, and audio output from /chat/completions. Use /audio/transcriptions for audio.
  • Dashboard prompt templates (the prompt parameter on /responses). Send instructions instead.

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:

JSON
{
  "error": {
    "message": "Tool type \"web_search\" is not supported. Glexir supports function and custom tools only.",
    "type": "invalid_request_error",
    "param": "tools[0]",
    "code": "unsupported_on_glexir"
  }
}

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