Authentication
To access any OriginRouter API endpoint, you must authenticate your requests. This guide explains how authentication works. OriginRouter supports two API authentication methods: Bearer Token and x-api-key. Both are available, with Bearer Token being recommended.
Bearer Token Authentication
All API requests must be authenticated via the Authorization request header. Construct your API key — obtained from the Developer Console — in the format Bearer YOUR_API_KEY and include it in the request header.
Example request with bearer token auth
curl https://api.easytransnote.com/beta/v1/models \
-H "Authorization: Bearer {YOUR_API_KEY}"
Security tip: Never commit secrets like your API key to public repositories.
x-api-key Authentication
In addition to standard Bearer Token authentication, the platform also supports authentication via the x-api-key request header — a simpler method. Simply send your API key directly as the value of the x-api-key header.
Example request with x-api-key auth
curl https://api.easytransnote.com/beta/v1/models \
-H "x-api-key: {YOUR_API_KEY}"
Security tip: Keeping your API key secure is essential. If you suspect your key has been compromised, reset it immediately.
Using SDKs
If you're using a third-party SDK, you don't need to worry about the details mentioned above — just get your access token from the Developer Console and point the SDK's request endpoint to our service. The client library will handle everything else automatically.
配置 Base URL
Our service provides two HTTP endpoint prefixes for different plans:
- Pay-as-you-go
/beta/v1/...: pay-as-you-go entry, covering chat / messages / responses / models / images / embeddings / files / web. - Coding plan
/coding/v1/...: OriginRouter One subscription entry point (chat / messages / responses / models only). - Legacy
/v1/...: retained only for existing integrations; not recommended for new integrations.
Different SDK protocols need different base_url values. See the table below. Full reference: Endpoint Configuration.
OpenAI Protocol Tools
OpenAI SDK / Codex CLI / Chatbox / SillyTavern / OpenClaw / OpenCode (OpenAI-compatible mode). The OpenAI protocol base_url must end with /v1:
| Plan | base_url |
|---|---|
| Pay-as-you-go | https://api.easytransnote.com/beta/v1 |
| Coding plan | https://api.easytransnote.com/coding/v1 |
Anthropic Protocol Tools
Anthropic SDK / Claude Code / OpenCode (Anthropic mode). Note: the Anthropic SDK appends /v1/messages to base_url automatically, so base_url must not end with /v1, otherwise the request becomes /v1/v1/messages (404):
| Plan | base_url |
|---|---|
| Pay-as-you-go | https://api.easytransnote.com/beta |
| Coding plan | https://api.easytransnote.com/coding |