Quickstart
Create an OpenGateway API key, call Chat Completions with curl or the OpenAI SDK, check the public model catalog, and review your request in the dashboard.
1. Create an API key#
Sign in to the OpenGateway dashboard, open API Keys, and choose Create new key. Copy the key when it is shown; you cannot view it again after closing the dialog. Keep it in a server-side environment variable:
export OPENGATEWAY_API_KEY="YOUR_API_KEY"
See API keys for key management and security guidance.
2. Make a request with curl#
Send a Chat Completions request to the shared base URL. This example uses the current openai/gpt-5-mini model ID.
curl "https://apis.opengateway.ai/v1/chat/completions" \-H "Authorization: Bearer $OPENGATEWAY_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "openai/gpt-5-mini","messages": [{"role": "user", "content": "Say hello in one sentence."}]}'
3. Use the OpenAI SDK#
Point the SDK at OpenGateway and use a model ID from the catalog.
Python#
import osfrom openai import OpenAIclient = OpenAI(api_key=os.environ["OPENGATEWAY_API_KEY"],base_url="https://apis.opengateway.ai/v1",)response = client.chat.completions.create(model="openai/gpt-5-mini",messages=[{"role": "user", "content": "Say hello in one sentence."}],)print(response.choices[0].message.content)
TypeScript#
import OpenAI from "openai";const client = new OpenAI({apiKey: process.env.OPENGATEWAY_API_KEY,baseURL: "https://apis.opengateway.ai/v1",});const response = await client.chat.completions.create({model: "openai/gpt-5-mini",messages: [{ role: "user", content: "Say hello in one sentence." }],});console.log(response.choices[0].message.content);
4. Inspect the catalog and dashboard#
GET /v1/models is public and does not require a key. Use it to check current model IDs, modalities, and supported endpoints:
curl "https://apis.opengateway.ai/v1/models"
The public response does not include pricing. Browse Models for model details and current pricing. After making a request, open the dashboard and usage and logs to inspect activity. See billing for credit and payment information.
Next steps#
- Models and routing — Choose a model and learn about routing.
- UltraFast — Review the active UltraFast models and pricing rules.
- Decisions API — Evaluate structured input.
- Claude Code guide — Configure an OpenGateway option for a coding agent.