- Context
- 128K tokens
- vs. official price
- 15% cheaper
Pricing (USD per 1M tokens)
How prices are calculated| Item | Official | Basic | Premium |
|---|---|---|---|
| Input | $5.00≈ ¥793 | $4.25≈ ¥680 | $3.75≈ ¥600 |
| Output | $15.00≈ ¥2,380 | $12.75≈ ¥2,040 | $11.25≈ ¥1,800 |
| Cache read | $2.50≈ ¥397 | $2.125≈ ¥340 | $1.875≈ ¥300 |
How to call
POST/v1/chat/completions
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="gpt-4o-2024-05-13",
messages=[{"role": "user", "content": "Hello"}],
)
print(res.choices[0].message.content)import os
from anthropic import Anthropic
# The Anthropic SDK adds /v1 at the end automatically
client = Anthropic(
base_url="https://token.echohub.io",
api_key=os.environ["ECHO_API_KEY"],
)
msg = client.messages.create(
model="gpt-4o-2024-05-13",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)curl https://token.echohub.io/v1/chat/completions \
-H "Authorization: Bearer $ECHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-2024-05-13",
"messages": [{"role": "user", "content": "Hello"}]
}'