hide.st

Developers

Keys and guides for the OpenAI- and Anthropic-compatible API. Requests are paid from the same balance as chat.

Create a key

Hide Router speaks the OpenAI and Anthropic APIs, so you can keep your SDK and change two things: the base URL and the key. Create a key on the API keys tab, then export it so the examples on this page can read it.

Shell
export HIDE_API_KEY=sk-hide-...

Every example uses one of these base URLs:

OpenAI-compatibleOpenAI SDKs and most tools
https://hide.st/api/v1
Anthropic-compatibleAnthropic SDKs and Claude Code
https://hide.st/api

Send a request

The Chat Completions endpoint works with the official OpenAI SDKs and any model in the catalog, including Claude, Gemini and Llama models.

curl https://hide.st/api/v1/chat/completions \
  -H "Authorization: Bearer $HIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-fable-5.1",
    "messages": [{"role": "user", "content": "Say hello in one short sentence."}]
  }'

The response has the usual OpenAI shape. usage.cost is the amount charged to your balance, in USD.

Stream the response

Set stream to true to receive tokens as they're generated. With stream_options.include_usage, the last chunk carries the token counts and the cost.

curl -N https://hide.st/api/v1/chat/completions \
  -H "Authorization: Bearer $HIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-6-sol",
    "stream": true,
    "stream_options": {"include_usage": true},
    "messages": [{"role": "user", "content": "Write a haiku about the sea."}]
  }'

Use the Anthropic SDK

The Messages API supports streaming, tool use, extended thinking and prompt caching. Anthropic SDKs add /v1/messages to the base URL themselves, so give them https://hide.st/api. The key works in the x-api-key header too.

curl https://hide.st/api/v1/messages \
  -H "x-api-key: $HIDE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-fable-5.1",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Say hello in one short sentence."}]
  }'

List models

Model IDs look like vendor/model. Add ?detailed=true to get names, prices, context length and capabilities. You can also browse them on the Models page.

Shell
# Every text model ID
curl -s https://hide.st/api/v1/models \
  -H "Authorization: Bearer $HIDE_API_KEY" | jq -r '.data[].id'

# Prices in USD per 1M tokens, context length and capabilities
curl -s "https://hide.st/api/v1/models?detailed=true" \
  -H "Authorization: Bearer $HIDE_API_KEY" \
  | jq '.data[] | {id, context_length, pricing, capabilities}'

Check your balance

available is your balance minus holds for requests that are still running.

curl -s https://hide.st/api/v1/balance \
  -H "Authorization: Bearer $HIDE_API_KEY"

Next, connect a coding tool, read the API reference, or check the errors and limits.

Search

Search pages, chats and models