Skip to main content

API Keys

All requests to the Caistro API must include an API key. You can manage your keys in the Console.

Creating an API Key

  1. Log in to the Console
  2. Navigate to API Keys
  3. Click Generate Key
  4. Copy your key immediately - it won’t be shown again

Using Your API Key

Include your API key in the Authorization header:
Authorization: Bearer cai_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Security Best Practices

Never expose your API key in client-side code or public repositories.
  • Store keys in environment variables
  • Rotate keys periodically
  • Use separate keys for development and production
  • Revoke compromised keys immediately

Billing

Caistro uses a credit-based pay-as-you-go model:
ModelInputOutput
Nous-20B$0.20 / 1M tokens$0.60 / 1M tokens
New users receive $1.00 in free credits (approximately 5M input tokens). Free credits are used first before prepaid credits. Purchase additional credits anytime in the Console.

Rate Limits

When you exceed your rate limit, you’ll receive a 429 Too Many Requests response.

Error Responses

StatusDescription
401Invalid or missing API key
402Insufficient credits
403Key doesn’t have permission
429Rate limit exceeded