Overview

What Relayvia serves, every endpoint at a glance and where to start.

Relayvia is an AI API gateway. Point your SDK or tool at Relayvia, use a Relayvia API key and call models by their official names. Requests keep the OpenAI, Anthropic or Gemini format and are billed against your account's prepaid credits.

Start here

Endpoints

OpenAI-format endpoints use the base URL https://api.relayvia.dev/v1. Anthropic and Gemini SDKs take https://api.relayvia.dev and add the rest of the path themselves. Each endpoint has its own page.

MethodPathFormatPage
POST/v1/chat/completionsOpenAIChat Completions
POST/v1/responsesOpenAIResponses
POST/v1/messagesAnthropicMessages
POST/v1beta/models/{model}:generateContentGeminiGemini native
POST/v1beta/models/{model}:streamGenerateContentGeminiGemini native
GET/v1/modelsQueryModels
GET/v1/models/{model}QueryModels
GET/v1/balanceQueryCheck credits
GET/v1/dashboard/billing/subscriptionQueryCheck credits
GET/v1/usageQueryCheck usage
GET/v1/dashboard/billing/usageQueryCheck usage
POST/v1/images/generationsAsync taskAsync tasks
POST/v1/video/generationsAsync taskAsync tasks
GET/v1/tasks/{task_id}Async taskAsync tasks

Set up with an AI agent

Paste the prompt below into an AI coding agent such as Claude Code or Codex CLI and it will configure your tools. The URLs and settings in it are the same as on the integration pages.

Note

Put your API key in the RELAYVIA_API_KEY environment variable first; the prompt does not contain the key.

Prompt
Configure my AI coding tools to use the Relayvia API gateway. My API key is in the environment variable RELAYVIA_API_KEY.

Facts:
- OpenAI-format base URL (Codex CLI, OpenAI SDKs, Cursor, Cline): https://api.relayvia.dev/v1
- Anthropic-format base URL (Claude Code): https://api.relayvia.dev
- Auth header: Authorization: Bearer <key> (the /v1/messages route also accepts x-api-key: <key>)
- Use official model names, e.g. claude-opus-5 or gpt-5.5. List models with GET https://api.relayvia.dev/v1/models.

Steps:
1. Ask me which tools to configure (Claude Code, Codex CLI, or others) before changing any file.
2. Claude Code: merge this into the env block of ~/.claude/settings.json, using the value of RELAYVIA_API_KEY as the token:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.relayvia.dev",
    "ANTHROPIC_AUTH_TOKEN": "sk-...",
    "ANTHROPIC_MODEL": "claude-opus-5"
  }
}
3. Codex CLI: merge this into ~/.codex/config.toml (the key is read from RELAYVIA_API_KEY):
model = "gpt-5.5"
model_provider = "relayvia"

[model_providers.relayvia]
name = "Relayvia"
base_url = "https://api.relayvia.dev/v1"
env_key = "RELAYVIA_API_KEY"
wire_api = "responses"
4. Verify with: curl https://api.relayvia.dev/v1/models -H "Authorization: Bearer $RELAYVIA_API_KEY"
5. If Claude Code still asks for a login method or reports an auth conflict, run /logout inside Claude Code and start it again.

Rules: never print, log, or commit the API key; keep existing settings in those files; show me a diff before writing.

Full documentation index: https://relayvia.dev/llms.txt

Docs for AI tools

/llms.txt lists every page of these docs. Every page also has a Markdown version: add .md to its URL, for example /docs/quickstart.md, or use Copy as Markdown at the top of the page.