Getting started

API keysand the gateway.

This page explains two terms you will meet when you start using Echo Token Station, and the steps to your first request.

  • What an API key does and where to keep it
  • Where a request goes after passing through Echo
  • Three steps to your first request

What is an API key?

An API key is a string that tells Echo who a request from your program comes from. Echo checks the account with the key and deducts the cost of what you use from that account's balance.

Anyone who knows your key can call models with your balance. Like a password, do not show it to others.

Shown in the list: 4 + 4Hidden: 4048 characters in total (1 dot = 1 character)

Echo keys start with "sk-" followed by 48 letters and digits. The list in the console shows only the first and last 4 characters.

Where should this key go?

Public repositories (GitHub, etc.)

Do not keep it

Anyone can read published code. If you publish code with the key in it, others will use it.

Environment variables on your server

OK to keep it

Write only a name such as ECHO_API_KEY in your program, and put the key's value in the server settings.

JavaScript running in the browser

Do not keep it

Anyone who opens the page can read the code in the browser. Use the key only on the server side.

Chats with AI and support requests

Do not keep it

It stays in the other service's records. When asking about an error, remove the key before pasting.

A .env file on your own computer

OK to keep it

Make sure the file is excluded from the repository (.gitignore) before using it.

Team chats and emails

Do not keep it

Issue a separate key for each person. You can set a limit for each key and stop only the key you need to stop.

If your key may have leaked, stop it under API keys in the console and issue a new one. Calls made with a stopped key return HTTP 401. The steps are in API keys and usage.

What is a gateway?

A gateway sits between your app and each company's AI models and relays requests. Your app only sends requests to Echo; Echo delivers them to each company's API and brings the answer back. Your key and balance are kept in one place: Echo.

/ 4

Your app

Sends a request with an API key and a model ID to Echo's endpoint URL.

/ 4

Echo

Checks the account with the key, confirms there is balance, and picks the route set for the model (a company's API). It does not store the content or the response of successful requests; it keeps only records such as the time, model, tokens and amount (exceptions: Data handling).

/ 4

The company's API

The API of the company running the model creates the answer. If that API has an outage, Echo does not switch to a route in another country or region.

/ 4

Answer

The answer returns to your app through Echo. Echo calculates the cost from the tokens used and deducts it from your balance.

Request (OpenAI format)POST https://token.echohub.io/v1/chat/completions Authorization: Bearer sk-… { "model": "claude-sonnet-5", "messages": [ … ] }
Company running the example modelAnthropic (processing region: Global)
Example calculation (simulation): Claude Sonnet 5, 1,000 input and 500 output tokens1,000 × $1.90/1M + 500 × $9.50/1M = $0.0066 (≈ ¥1.06) (provisional price)

Three steps to your first request

Sign-up is free. To use the API, you need to top up (from $10).

  1. Get a key

    Issue one under API keys in the console. You log in to the console with your Echo AI Hub account.

  2. Set the endpoint URL

    For OpenAI-format SDKs and tools, set the endpoint to the URL below. For the Anthropic SDK and Claude Code, leave off the trailing /v1.

    OpenAI format (OpenAI SDK, Cursor, Cline, Codex CLI, etc.)
    https://token.echohub.io/v1
    Anthropic format (Anthropic SDK, Claude Code)
    https://token.echohub.io
  3. Make a call

    Put the key you issued in the ECHO_API_KEY environment variable and run the code below.

    import os
    from openai import OpenAI
    
    client = OpenAI(
        base_url="https://token.echohub.io/v1",
        api_key=os.environ["ECHO_API_KEY"],
    )
    
    res = client.chat.completions.create(
        model="claude-sonnet-5",
        messages=[{"role": "user", "content": "Hello"}],
    )
    print(res.choices[0].message.content)

Detailed steps, starting from creating an account, are in the Quickstart.

What to read next

  • Tool setup

    Steps to connect Echo to the development tools you use.

  • Models

    Compare prices, processing regions and context length for each model.

  • Model comparison (console)

    Send the same prompt to 2 or 3 models and compare their answers, tokens, cost and response time side by side. The cost is deducted from the key you choose.