Skip to main content

Documentation Index

Fetch the complete documentation index at: https://astralform.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

API keys authenticate requests from your iOS app to Astralform. Each project can have multiple API keys for different environments or purposes.

Generating an API Key

  1. Open your project in the dashboard
  2. Go to Settings > API Keys
  3. Click Generate New Key
  4. Copy the key immediately - it won’t be shown again
API keys are shown only once when created. Store them securely.

Key Format

API keys follow this format:
af_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • af_ - Astralform prefix
  • live_ - Environment (live or test)
  • xxxx... - Random identifier

Using API Keys

Include the key in all API requests:
let client = AstralformClient(
    baseURL: URL(string: "https://api.astralform.ai")!,
    apiKey: "af_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
)
Or in raw HTTP requests:
curl -X POST https://api.astralform.ai/v1/chat/stream \
  -H "X-API-Key: af_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"conversation_id": "...", "message": "Hello"}'

Rotating Keys

To rotate a key without downtime:
  1. Generate a new key
  2. Update your app to use the new key
  3. Deploy the updated app
  4. Delete the old key

Revoking Keys

If a key is compromised:
  1. Go to Settings > API Keys
  2. Find the compromised key
  3. Click Revoke
  4. Generate a new key and update your app

Best Practices

DoDon’t
Store keys in secure storage (Keychain)Hardcode keys in source code
Use different keys per environmentShare keys across projects
Rotate keys regularlyCommit keys to version control
Revoke unused keysLeave old keys active

Rate Limits

API keys have the following default limits:
PlanRequests/minRequests/day
Free601,000
Pro30050,000
EnterpriseCustomCustom

Next Steps

LLM Providers

Configure which AI models to use

iOS SDK

Configure the SDK with your key