- Base URL:
https://api.syon.com - Authentication: API Key (
sk-...) - Protocols: Anthropic native format (
/v1/messages), OpenAI-compatible format (/v1/chat/completions), OpenAI Responses API (/v1/responses, GPT models only), Gemini native format (/v1beta/models/{model}:generateContent), and image generation (/v1/images)
sk-xxxxxx with your own key. Keep the key private and never commit it to a code repository.
1. Authentication
Choose the compatible format according to the model you use: Different formats use different authentication headers. Choose the header according to the protocol:2. Available models
Fetch the complete model list in real time withGET /v1/models:
bash
3. Anthropic native format
Endpoint:POST /v1/messages
3.1 Basic request
bash3.2 Streaming with SSE
Add"stream": true. The response is text/event-stream:
bash
message_start ->content_block_start -> multiple content_block_delta events ->content_block_stop ->message_delta ->message_stop.
3.3 Python SDK with anthropic
python
4. OpenAI-compatible format
Endpoints:POST /v1/chat/completions (Chat Completions) and POST /v1/responses (Responses API, GPT models only)
4.1 Basic Chat Completions request
bashchat.completion structure:
json
4.2 Python SDK with openai
python
4.3 Streaming
Add"stream": true. Syon returns standard OpenAI SSE chunks in the data: {...} format and ends with data: [DONE].
4.4 Basic Responses API request
If your application already uses the OpenAI Responses API, call/v1/responses directly:
bash
/v1/responses only supports GPT models. Requests for Claude / Gemini return 400. Use /v1/messages for Claude and the Gemini native format for Gemini.
4.5 Python SDK with openai Responses
python
4.6 Responses API streaming
Add"stream": true to receive standard OpenAI Responses API streaming events.
4.7 Fast mode
Syon’s OpenAI-compatible endpoints support Fast mode (formerly Priority processing). Add this to your Chat Completions or Responses API request: jsonfast is the current recommended value; the legacy value priority still works and behaves identically. Both apply to all GPT-series models that support Fast mode. With Fast mode enabled, gpt-5.6-sol runs up to 2.5x faster than Standard. Fast mode is billed at 2x the standard rate. For GPT-5.6 and earlier models, the service_tier field in the response object may still return "priority" — this is expected.
5. Gemini native format
Endpoint:POST /v1beta/models/{model}:generateContent
5.1 Basic request
bash5.2 Streaming with SSE
UsestreamGenerateContent and add alt=sse:
bash
5.3 Environment variables
If your tool or SDK supports a custom Gemini Base URL, configure it like this: bashbase_url, baseURL, apiEndpoint, or environment variables. The core rule is: point the Base URL to https://api.syon.com and use your Syon API Key.
6. Image generation (GPT Image 2)
The image modelgpt-image-2 uses the separate /v1/images endpoints and authenticates with Authorization: Bearer.
6.1 Generate images
Endpoint:POST /v1/images/generations
bash
data[0].b64_json is the Base64-encoded image:
json
6.2 Edit images
Endpoint:POST /v1/images/edits
Upload the source image as multipart/form-data and provide an edit instruction:
bash
7. Connect agent tools
Claude Code uses the Anthropic protocol, Codex uses the OpenAI protocol, and Gemini CLI uses the Gemini protocol. Just point the Base URL and API Key environment variables to Syon. You do not need to modify the tools themselves. Claude Code (Anthropic protocol): bash8. FAQ
Getting 401 / authentication failed? First verify the protocol-to-header mapping: Anthropic usesx-api-key; OpenAI / Gemini use Authorization: Bearer; Gemini native endpoints also accept x-goog-api-key. Then confirm the key is complete, starts with sk-, has no extra spaces, and has not been deleted in the dashboard. Also check the base_url format: OpenAI SDKs need /v1; Anthropic SDKs do not.
Calling Claude through the OpenAI format returns errors, costs more, or performs worse?
Use the Anthropic native protocol (/v1/messages) for Claude models whenever possible. Claude Code and other agent tools must be configured with the Anthropic protocol. Calling Claude through the OpenAI-compatible format can lose prompt cache, thinking, and other capabilities, increasing cost and reducing quality. It is only suitable for simple chat scenarios. /v1/responses does not support Claude / Gemini and returns 400.
Model unavailable?
Use GET /v1/models to fetch the real-time model list first. Check the model ID spelling, use lowercase, and pay attention to - versus .. Also confirm the endpoint matches the model.
Timeout or slow first token?
Large models such as Opus / Fable can take several seconds to tens of seconds for the first token during reasoning. This does not mean the request failed. In production, set "stream": true for better perceived latency and increase the client read timeout. The server supports responses up to 600 seconds.
Key security:
Store keys in environment variables or a secret manager. Do not hardcode them, commit them to Git, or bundle them into a frontend / public client. If you suspect a key has leaked, delete it in the dashboard immediately and create a replacement.
