Yaha AI Gateway
Getting Started

Overview

Gateway URL, project key, supported endpoints, and your first request.

Yaha AI Gateway is an OpenAI-compatible gateway for applications, SDKs, and coding agents. Point your client at the gateway URL and authenticate with a yaha.* project key. Your application does not need provider API keys.

1. Get a project API key

  1. Sign in to the console.
  2. Open your project → API keys.
  3. Create a member key. It starts with yaha.; use the full string as your API key.

See Prerequisites for allowlists, upstream keys, and troubleshooting.

2. Set the gateway URL

Use this gateway base URL. Include /v1 for OpenAI-compatible clients:

https://gateway.yahagateway.io/v1

Most OpenAI-compatible clients accept a base URL ending in /v1. Some Anthropic-compatible tools use the host only without /v1; see the Claude Code guide.

3. Pick a model

List the models available to your project:

curl https://gateway.yahagateway.io/v1/models \
  -H "Authorization: Bearer yaha.YOUR_PROJECT_KEY"

Use one of the returned model IDs in your request body. Model access is controlled by your project configuration.

4. Send a test request

curl https://gateway.yahagateway.io/v1/chat/completions \
  -H "Authorization: Bearer yaha.YOUR_PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello from Yaha"}]
  }'

Replace yaha.YOUR_PROJECT_KEY with your key and pick a model on your project allowlist.

Supported public endpoints

The gateway accepts common OpenAI-compatible /v1/* routes, including:

  • Text: /v1/chat/completions, /v1/responses, /v1/messages, /v1/completions
  • Embeddings and ranking: /v1/embeddings, /v1/rerank
  • Image, audio, and video: /v1/images/generations, /v1/images/edits, /v1/audio/speech, /v1/audio/transcriptions, /v1/videos
  • Moderation: /v1/moderations
  • Discovery and reporting: /v1/models, /v1/generation?id=REQUEST_ID

Streaming is supported for clients that set "stream": true on compatible generation endpoints.

Next steps

On this page