Quickstart
Everything you need to send your first request.
- 1Create a key
Sign up, add credits on the Billing page, then create an API key under API Keys.
- 2Set the base URL
Use the endpoint below with any OpenAI- or Anthropic-compatible client.
- 3Pick a model
Use a model name exactly as it appears on the pricing page. Pricing →
Base URL
OpenAI format
https://api.paramhub.com/v1Anthropic format
https://api.paramhub.comExamples
from openai import OpenAI
client = OpenAI(
base_url="https://api.paramhub.com/v1",
api_key="YOUR_API_KEY",
)
resp = client.chat.completions.create(
model="kimi-k3.1-pro",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)Use with Claude Code
Set these environment variables before starting Claude Code: Full Claude Code guide →
export ANTHROPIC_BASE_URL="https://api.paramhub.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="kimi-k3.1-pro"
export ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-k3.1-pro"
export ANTHROPIC_DEFAULT_SONNET_MODEL="kimi-k3.1-pro"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="kimi-k3.1-pro"
claudeStreaming and timeouts
Prefer streaming for long outputs: you see tokens as they are generated. A request is closed if no data is sent for 10 minutes.
Errors
401The API key is missing, wrong, or disabled.403Your balance is too low. Add credits and retry.429Too many requests. Back off and retry with exponential delay.503With code model_not_found: the model name is wrong. Names are case-sensitive; copy them from the pricing page.5xxThe upstream model failed. Retrying is safe; you are not charged for failed requests.