RelayX 文档RelayX 文档
API Reference

API Reference

RelayX API documentation and quick start

Quick Start

RelayX provides a unified entry point for AI API calls. Prepare your account, confirm your balance, create an API key, choose a model, and then call the API from your app, script, or client.

Onboarding Flow

Sign in

Open the RelayX console and sign in to view your balance, available models, and API keys.

Check balance

Confirm that your account has enough available balance before sending production requests.

Create an API key

Create a key in the API Key or token page and store it safely. Do not expose it in public code or frontend pages.

Choose a model

Pick a model based on your use case. Text, image, audio, embedding, and other model types may have different pricing and latency.

Basic Request

RelayX is compatible with common OpenAI-style APIs. Use your RelayX endpoint as the base URL and pass your API key in the authorization header.

curl https://your-domain/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-api-key" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {
        "role": "user",
        "content": "Introduce RelayX in one sentence."
      }
    ]
  }'

Usage Tips

Start with small traffic

Before production use, verify model behavior, response format, billing, and error handling with a small number of requests.

Match models to tasks

Chat, code, long context, image, audio, and embedding tasks often need different models. Start with a balanced model first.

Protect your key

Store API keys on the server side, preferably in environment variables. Never ship them in frontend code or public repositories.

API Overview

RelayX provides RESTful APIs for AI model calls and is compatible with common OpenAI-style integrations. Use these APIs to list models, create chat completions, generate text, create embeddings, generate images, process audio, and more.

AI Model APIs

Table of contents

API Reference | RelayX Docs