API Reference
Endpoints, request formats, and response schemas.
OhMyGPT speaks the OpenAI API, the Anthropic Messages API, the Google Gemini API, and the OpenAI Responses API natively at the edge. If you have existing code that uses any of them, you can switch to OhMyGPT by changing the base URL — and every chat model is callable through every one of these protocols. Start with Protocols for how passthrough and translation work.
Base configuration
| Item | Value |
|---|---|
| Base URL | https://api.ohmygpt.com/v1 |
| Authentication | Authorization: Bearer $OHMYGPT_API_KEY |
| Content-Type | application/json |
Chat protocols
| Endpoint | Description |
|---|---|
POST /chat/completions | OpenAI Chat Completions — every chat model |
POST /responses | OpenAI Responses API, with stored-response retrieval routes |
POST /messages | Anthropic Messages API, plus /messages/count_tokens |
POST /models/{model}:generateContent | Google Gemini generateContent (and :streamGenerateContent) |
Decisions endpoints
| Endpoint | Description |
|---|---|
POST /decisions | OpenAI Decisions (gpt-6-luna) — typed questions, typed answers |
POST /systemone | TypeSafe System One (jev-latest) |
Other endpoint families
| Endpoint | Description |
|---|---|
GET /models, GET /models/{model} | Model catalog with per-model protocol support and pricing views |
POST /embeddings, POST /rerank, POST /ocr, POST /moderations | Text and content-processing endpoints |
POST /images/generations, POST /images/edits | Image endpoints |
POST /audio/speech, POST /audio/transcriptions | Audio endpoints |
POST /batches (+ lifecycle routes) | Batch jobs (OpenAI shape) |
GET /realtime, GET /gemini/live | Realtime WebSocket sessions |
POST /videos (+ lifecycle routes) | Video generation jobs |
Guides
Protocols
Passthrough vs. translation, support matrix, field rules
Streaming
Stream responses in real-time
Parameters
Request parameters reference
Thinking
Controlling reasoning models
Protocol pages
Chat Completions
OpenAI-compatible chat endpoint
Responses
OpenAI Responses API
Messages
Anthropic Messages API
Gemini API
Google Gemini generateContent
Decisions
Typed decisions endpoints
Alternative endpoints
For users in different regions:
| Endpoint | Description |
|---|---|
https://api.ohmygpt.com | Direct US server |
https://apic1.ohmycdn.com | Cloudflare CDN (recommended worldwide) |
https://c-z0-api-01.hash070.com | China-optimized CDN |
How is this guide?
Last updated on
