Introducing our new Monitoring feature Learn more

Documentation

Authentication

Authenticate to the Krastie API with an api-key header. Keys are available on Business and higher plans.

Authentication

The public API authenticates with an API key sent in a custom header (not Authorization: Bearer).

HeaderValue
api-keyYour 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

  1. Open the Krastie app and go to Integrations.
  2. Open Krastie API.
  3. Generate a key. Copy it immediately — the full key is shown only once.
  4. 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

StatusMeaning
401Missing or invalid API key
403Valid key, but plan does not include API access
500Unexpected 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.