https://relai.vip/v1Chat Completions: /chat/completions
Responses: /responses
INTEGRATION GUIDE
Create or retrieve an API key from the account entry, then send a first request through OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages. Every example reads the key from an environment variable.
01 · SETUP
Open https://relai.vip/login, use the account flow, and create or retrieve the API key for requests. Never put the key in frontend code, a public repository, logs, or screenshots.
export RELAI_API_KEY="your-key-from-account"
export RELAI_BASE_URL="https://relai.vip/v1"
export RELAI_ANTHROPIC_BASE_URL="https://relai.vip"
02 · BASE URL
https://relai.vip/v1Chat Completions: /chat/completions
Responses: /responses
https://relai.vipMessages: /v1/messages
03 · REQUESTS
curl "$RELAI_BASE_URL/chat/completions" \
-H "Authorization: Bearer $RELAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"messages": [{"role": "user", "content": "Reply with one short sentence."}]
}'
curl "$RELAI_BASE_URL/responses" \
-H "Authorization: Bearer $RELAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"input": "Reply with one short sentence."
}'
curl "$RELAI_ANTHROPIC_BASE_URL/v1/messages" \
-H "x-api-key: $RELAI_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 64,
"messages": [{"role": "user", "content": "Reply with one short sentence."}]
}'
04 · TROUBLESHOOTING
401Check the key, Authorization / x-api-key headers, and account state. Do not retry 401 automatically.
429Use bounded exponential backoff and retain request IDs.
5xxKeep the response and request ID, use bounded backoff, and do not repeat a write that may already have executed.
05 · LIMITS
The service provides OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages request formats. Whether a specific model supports a format, parameter, context length, or response shape must be confirmed in the live model plaza and with a real request. “OpenAI-compatible” does not mean identical to the official API.
Validate authentication, model IDs, request formats, error handling, and timeouts before production traffic. Check the signed-in model plaza for prices and group availability.
FAQ
Use https://relai.vip/v1 as the base URL. For example, the full Chat Completions path is https://relai.vip/v1/chat/completions.
Use https://relai.vip as the Anthropic SDK base URL. The Messages request path is https://relai.vip/v1/messages.
OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages are supported. Whether a particular model supports a particular format must be confirmed in the live model plaza and by an actual request.
No. It means the request entry follows the relevant API format. Model implementations, routing, supported parameters, context limits, and responses may still differ. Validate the target model with a real request before launch.
For 401, check the key, request headers, and account state; do not retry automatically. For 429 and 5xx, use bounded exponential backoff and retain request IDs. Do not repeatedly submit a write or tool action that may already have executed.