Getting Started
The Cortiqa API uses API keys for authentication. Every request must include a valid API key in the request headers.
API keys are generated from the Cortiqa Console. Each key is cryptographically signed (prefixed with sk-cortiqa-) and tracks your rate limits and credit balance.
Pass your secret key in the standard Authorization: Bearer header (or alternatively x-api-key):
curl https://api.cortiqa.co/api/v1/chat/completions -H "Authorization: Bearer sk-cortiqa-YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"model": "openai/gpt-oss-120b",
"messages": [
{"role": "user", "content": "Hello, Cortiqa!"}
]
}'Or using the official Python SDK:
from cortiqa import Cortiqa
# Option 1: Reads CORTIQA_API_KEY environment variable automatically
client = Cortiqa()
# Option 2: Pass key explicitly
client = Cortiqa(api_key="sk-cortiqa-YOUR_API_KEY")The recommended approach is to store your API key in an environment variable:
# Linux/macOS
export CORTIQA_API_KEY="sk-cortiqa-your-api-key-here"
# Windows (PowerShell)
$env:CORTIQA_API_KEY="sk-cortiqa-your-api-key-here"
# .env file (use with dotenv)
CORTIQA_API_KEY="sk-cortiqa-your-api-key-here".env to your .gitignore.You can manage your API keys from the Cortiqa Console: