OhMyGPT

API Reference

Endpoints, request formats, and response schemas.

OhMyGPT provides an OpenAI-compatible API. If you have existing code that uses the OpenAI API, you can switch to OhMyGPT by changing the base URL.

Base configuration

ItemValue
Base URLhttps://api.ohmygpt.com/v1
AuthenticationAuthorization: Bearer $OHMYGPT_API_KEY
Content-Typeapplication/json

Supported endpoints

EndpointDescription
POST /chat/completionsGenerate chat completions (text, tool calls)
POST /messagesAnthropic Messages API (Claude)

Guides

Endpoint Reference

Alternative endpoints

For users in different regions:

EndpointDescription
https://api.ohmygpt.comDirect US server
https://apic.ohmygpt.comCloudflare CDN (global)
https://c-z0-api-01.hash070.comChina-optimized CDN

How is this guide?

Last updated on

On this page