Skip to main content
Every Knouds API request must include a valid API key. Each key carries a set of capabilities that determine which endpoints you can call. Capabilities are orthogonal — a key holds an explicit subset (mix and match by use case) rather than a single rank.

Generating a key

Go to Settings → API Keys in your Knouds account (or the Developer Dashboard) and create a new key. The full key value is shown exactly once at creation time — copy it immediately. If you lose it, you must revoke the key and generate a new one. When you create a key, you pick a preset (or Custom for granular grants): Free users cannot create usable API keys — Free tier has no external API access by product design. Pro+ unlocks key creation.

Passing your key

Include the key in the x-api-key header on every request:

Capability vocabulary

Capabilities are orthogonal, not cumulative — a key with model:run does NOT automatically get workflow:write. Grant exactly what your integration needs.

Match logic

requireCapability(cap) resolves with a 4-step check:
  1. Key has * (admin override) → pass
  2. Key has cap exactly → pass
  3. Key has <resource>:* matching cap (resource-level wildcard) → pass
  4. Required cap is <resource>:<id>:<action> AND key has <resource>:<action> (general implies specific) OR <resource>:*:<action> (pattern admission) → pass
Otherwise → 403 CAPABILITY_DENIED. A key with workflow:run passes POST /api/workflows/anything/run (general implies specific). A key with workflow:my-flow:run only passes that specific slug.

Tier ceiling

A user can only grant capabilities up to their tier’s ceiling. The server rejects above-ceiling grants with 403 CAPABILITY_ABOVE_CEILING.

Error responses

Missing or invalid key — 401

Check that the x-api-key header is present and that the key has not been deleted from the dashboard.

Pre-Phase-11 key retired — 401

Keys created before May 2026 (the Phase 11 capability cutover) were retired. Generate a new key from the Developer Dashboard. See Migration from scopes for the mapping.

Capability denied — 403 CAPABILITY_DENIED

If your key’s capability set does not cover the endpoint, you receive a 403:
Use the required field to know which capability would have passed. Either regenerate your key with broader capabilities (capped by your tier) or upgrade your tier.

Capability above ceiling — 403 CAPABILITY_ABOVE_CEILING

If you try to grant a capability above your tier’s ceiling at key creation time:
Upgrade your tier to Business+ or grant a lower-tier capability instead.

Free tier no API access — 403 API_KEY_ACCESS_DENIED

Free tier users attempting to create an API key receive:
Upgrade to Pro to unlock external API access.