Login

API Integration

A quick start guide to using your API key and endpoint.

1

Select Your API Endpoint

Use the following base URL for all your API requests. We recommend using the one marked below.

https://api.ohmygpt.com

US Direct - Main backend direct service

https://apic.ohmygpt.com

Cloudflare CDN - Cloudflare CDN global acceleration node

https://c-z0-api-01.hash070.com

Asia Optimized CDN - Asia region optimized backend service

https://cn2us02.opapi.winRecommended

Asia Network Optimized CN2 GIA - Asia region optimized backend service

Please Note

The recommended endpoint is based on network latency tests from the browser to the endpoint and does not represent the actual response performance of the endpoint. Please choose the best endpoint according to the geographical location of your server.

2

Follow the integration guide

Authentication and Request Example

Authentication

All API requests must be authenticated with an API key. Include your key in the Authorization header as a Bearer token.

Note: Replace YOUR_API_KEY with your actual key. You can manage your keys here.

Making a Request

Here is a full example of how to make a chat completion request using cURL. You can copy and run it in your terminal to test your API key and endpoint configuration.