Docs
Connect your client
Sign in to your Aerogate workspace and obtain a funded API key beginning with sk-aero-. Store it in the AEROGATE_API_KEY environment variable for the examples below.
Open workspace keys →
GET /v1/models
List the model IDs available to your key before choosing one for a request.
ModelscURL
curl https://aerogate.dev/v1/models \ -H "Authorization: Bearer $AEROGATE_API_KEY"
OpenAI SDK
For the OpenAI SDK, set base_url to https://aerogate.dev/v1 and pass your Aerogate key as api_key. Chat Completions and Responses use the same credentials.
Chat CompletionscURL
curl https://aerogate.dev/v1/chat/completions \
-H "Authorization: Bearer $AEROGATE_API_KEY" \
-H 'content-type: application/json' \
-d '{
"model": "gpt-6.2-sol",
"messages": [{"role": "user", "content": "Hello!"}]
}'ResponsescURL
curl https://aerogate.dev/v1/responses \
-H "Authorization: Bearer $AEROGATE_API_KEY" \
-H 'content-type: application/json' \
-d '{"model": "gpt-6.2-sol", "input": "Hello!"}'Anthropic SDK
For the Anthropic SDK, set base_url to https://aerogate.dev and pass your Aerogate key as api_key.
MessagescURL
curl https://aerogate.dev/v1/messages \
-H "x-api-key: $AEROGATE_API_KEY" \
-H 'anthropic-version: 2023-06-01' \
-H 'content-type: application/json' \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 128,
"messages": [{"role": "user", "content": "Hello!"}]
}'Count tokenscURL
curl https://aerogate.dev/v1/messages/count_tokens \
-H "x-api-key: $AEROGATE_API_KEY" \
-H 'anthropic-version: 2023-06-01' \
-H 'content-type: application/json' \
-d '{
"model": "claude-sonnet-5",
"messages": [{"role": "user", "content": "Hello!"}]
}'Balance and usage
Use a workspace API key to read its own remaining budget and paginated request logs. Configure your key in the Aerogate console.
Client KeycURL
curl https://aerogate.dev/sub-key/balance \ -H "Authorization: Bearer $AEROGATE_API_KEY" curl 'https://aerogate.dev/sub-key/usage-logs?page=1&limit=20' \ -H "Authorization: Bearer $AEROGATE_API_KEY"