Authentication
The public API authenticates with an API key sent in a custom header (not Authorization: Bearer).
Header
| Header | Value |
|---|---|
api-key | Your full key (krastie_…) |
curl https://api.krastie.ai/v1/ai/generate/text \
-H "api-key: krastie_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","text":"Write a short product intro."}'
Creating a key
- Open the Krastie app and go to Integrations.
- Open Krastie API.
- Generate a key. Copy it immediately — the full key is shown only once.
- Keys remain valid until you revoke them.
You can have one active API key per account. Regenerating replaces the previous key.
Plan requirements
API access requires Business, Growth, or Enterprise. Requests with a valid key on a lower plan return 403:
{
"message": "API access requires a Business plan or higher.",
"errCode": 403
}
Errors
| Status | Meaning |
|---|---|
401 | Missing or invalid API key |
403 | Valid key, but plan does not include API access |
500 | Unexpected error while validating the key |
{ "message": "Unauthorized", "errCode": 401 }
Security tips
- Store keys in environment variables or a secrets manager — never commit them.
- Rotate (regenerate) keys if they may have been exposed.