address-cardAuthentication

All Commonstack API requests require an API key. You can generate one from your dashboard at commonstack.aiarrow-up-right.

Base URL

https://api.commonstack.ai/v1

Auth header

Use the Authorization header with your API key:

Authorization: Bearer YOUR_API_KEY

Example

curl https://api.commonstack.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4.1",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Using the Anthropic SDK

If you prefer to use the Anthropic SDK, see the Anthropic SDK Compatibility page for setup instructions.

circle-info

Notes

  • The same API key works for all models across all providers.

  • Keep your API key secure. Do not expose it in client-side code or public repositories.

  • You can create multiple keys with different expiry dates and usage limits from your dashboardarrow-up-right. See Account & API Keys.

Last updated