DocsQuickstart

Quickstart

The three steps of signing up, topping up and issuing an API key, and your first API call.

Follow the steps on this page to go from signing up to your first API call. There are three steps: sign up, top up, and issue a key.

Sign-up is free, but calling the API requires a balance (top-ups start from ¥1,000). Sign-up bonus: [ ]

Choose how to connect

How you use itBase URLWhere to read
OpenAI SDKhttps://token.echohub.io/v1This page
Anthropic SDKhttps://token.echohub.io (without /v1)This page
Claude Codehttps://token.echohub.io (without /v1)Claude Code
Codex CLIhttps://token.echohub.io/v1Codex CLI
Cursor, Cline, Dify and other tools that support the OpenAI formathttps://token.echohub.io/v1Cursor, Cline, Dify
Switch existing SDK code to EchoSame as each SDK"Switch your existing code" on this page

Both formats use the same API key. Base URLs for other SDKs and tools are in "Base URL for each SDK and tool" in the API reference.

1. Create an account

You can create an account after the member site Echo AI Hub opens. As of 2026-09-28 the member site has not opened, so you cannot sign up or log in yet.

After it opens, the steps are as follows.

  1. Open the console (https://token.echohub.io/console ). You are taken to the Echo AI Hub login screen
  2. Sign up or log in on the Echo AI Hub screen. The account is shared by both sites
  3. When you finish, you return to the Echo Token Station console (the management screen for issuing API keys and checking usage)

The console is available in Japanese only. In the steps below, labels in the console are written in Japanese, followed by an English translation in parentheses.

Right after you sign up, the console shows 「API の利用を準備しています」 (Preparing API access). When it is ready, the screen switches automatically.

2. Top up

  1. In the console menu, open 「残高とチャージ」 (Balance and top-up) and click 「チャージする」 (Top up)
  2. Choose an amount and click 「お支払いへ進む」 (Continue to payment). You are taken to the Stripe payment page. Pay by credit card
  3. When the payment is done, you return to 「残高とチャージ」 in the console. It can take a few seconds to about a minute before the balance is updated. The screen refreshes automatically when it is

Amounts, expiry and the order in which balances are used are in Pricing and top-ups.

3. Issue an API key

  1. In the console menu, open 「APIキー」 (API keys) and click 「キーを発行」 (Issue key)
  2. In 「名前」 (Name), enter a name that shows what the key is for (for example, production server). To limit how much the key can spend, also fill in 「利用上限(円)」 (Spending limit (JPY))
  3. Click 「発行する」 (Issue) and the key is shown. Click 「キーをコピー」 (Copy key) and store it. A key is a string that starts with sk-

The screen that shows the new key also shows code for a first call with that key filled in.

Note: Do not show your key to anyone. Do not put it in a public repository or in code that runs in the browser. If a key leaks, stop it in the console.

Your first call

Put the key in an environment variable

An environment variable is a named value set on your computer or server, so that you do not have to write the key in your code. This documentation uses the name ECHO_API_KEY.

bash
# macOS・Linux
export ECHO_API_KEY="sk-..."
PowerShell
# Windows(PowerShell)
$env:ECHO_API_KEY = "sk-..."

Install an SDK and call the API

Choose a language and SDK in the tabs below. The tab you choose is kept on the other pages of this documentation. The model ID (the string that selects which model to call) is an example: the OpenAI-format examples use deepseek-flash and the Anthropic-format examples use claude-sonnet-5. You can find the IDs of available models in the model list.

This calls the API in the OpenAI format.

bash
curl "https://token.echohub.io/v1/chat/completions" \
  -H "Authorization: Bearer $ECHO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-flash",
    "messages": [
      {"role": "user", "content": "日本の首都はどこですか?"}
    ]
  }'

A successful response

If the text of the answer is shown, the call succeeded. With curl, you get JSON like the following (the ID, time and token counts are examples).

JSON
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1790000000,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {"role": "assistant", "content": "日本の首都は東京です。"},
      "finish_reason": "stop"
    }
  ],
  "usage": {"prompt_tokens": 16, "completion_tokens": 9, "total_tokens": 25}
}

The call appears in 「呼び出し履歴」 (Call history) in the console with its time, model, token counts and amount. It can take a few seconds to appear.

If you get an error, look up the HTTP status and the error body in Errors and fixes. If you get 401 even though the key is correct, check the /v1 in the base URL.

Switch your existing code

For code that uses the OpenAI or Anthropic SDK, change three things: the base URL, the API key and the model ID.

What to changeOpenAI SDKAnthropic SDK
Base URLSet base_url (baseURL in TypeScript) to https://token.echohub.io/v1Set base_url (baseURL in TypeScript) to https://token.echohub.io
API keyYour Echo API keyYour Echo API key
Model IDAn Echo model IDAn Echo model ID

These are the changes for the Python OpenAI SDK.

diff
 client = OpenAI(
-    api_key=os.environ["OPENAI_API_KEY"],
+    base_url="https://token.echohub.io/v1",
+    api_key=os.environ["ECHO_API_KEY"],
 )

You can also switch with environment variables without changing the code. The OpenAI SDK reads OPENAI_BASE_URL and OPENAI_API_KEY, and the Anthropic SDK reads ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY.

bash
# OpenAI の SDK
export OPENAI_BASE_URL="https://token.echohub.io/v1"
export OPENAI_API_KEY="$ECHO_API_KEY"

# Anthropic の SDK
export ANTHROPIC_BASE_URL="https://token.echohub.io"
export ANTHROPIC_API_KEY="$ECHO_API_KEY"

Start with an AI coding tool

To let Claude Code, Cursor or another tool do the setup, give it the following text as is.

Text
Set up this project to use the Echo Token Station API.
- Base URL for the OpenAI format: https://token.echohub.io/v1
- Base URL for the Anthropic format: https://token.echohub.io (the Anthropic SDK adds /v1/messages. Only when using @ai-sdk/anthropic, specify https://token.echohub.io/v1)
- Read the API key from the environment variable ECHO_API_KEY. Do not write the key in code or in the repository
- Model ID to use: deepseek-flash (an example. Available models are listed at https://token.echohub.io/models )
- Documentation index: https://token.echohub.io/llms.txt
PageContents
Tool setupClaude Code, Codex CLI, Cursor, Cline, Dify, LangChain
API keys and usageShowing, stopping and deleting keys, spending limits, reading usage and the call history
API referenceEndpoints, streaming, main parameters
Errors and fixesThe error body format and what to do in each case

Sources

WhatSourceChecked
Base URLs and whether to include /v1, the 404 without /v1 (rechecked on 2026-10-11), calls from each SDK (OpenAI SDK: Python 2.54.0, Node.js 7.23.0; Anthropic SDK: Python 1.8.0, Node.js 0.128.0)Measured in Echo's test environment, with the same relay settings as production and a server that returns test responses in place of the upstream API2026-09-27
base_url and baseURL in the OpenAI SDK, the environment variables OPENAI_BASE_URL and OPENAI_API_KEYhttps://github.com/openai/openai-python , https://github.com/openai/openai-node2026-09-27
base_url and baseURL in the Anthropic SDK, adding /v1/messages, the environment variables ANTHROPIC_BASE_URL and ANTHROPIC_API_KEYhttps://github.com/anthropics/anthropic-sdk-python , https://github.com/anthropics/anthropic-sdk-typescript2026-09-27
@ai-sdk/anthropic needs /v1 in the base URLMeasured in Echo's test environment2026-09-27
The flow of signing up and issuing a key, labels on the screens, the delay before the balance updates, 「API の利用を準備しています」 right after sign-upThe Echo Token Station console (screens as of 2026-09-28)2026-09-28
The top-up flow (the screen for choosing an amount, moving to the Stripe payment page, the page you return to)Measured in Echo's test environment, with test servers in place of the member site Echo AI Hub and Stripe2026-10-01