Skip to main content

Creating API Keys

Only workspace owners and admins can create API tokens. If you don’t see the option to create a token, contact your workspace owner to request access or an elevated role. To create an API key:
  1. Navigate to krea.ai/settings/api-tokens
  2. Make sure you’re in the correct workspace (using the workspace toggle on the top left)
  3. Click “New Token”
  4. Give your token a descriptive name
  5. Save the token securely—you’ll only see it once!
The API operates as its own user identity within your workspace. Styles trained in the app won’t be accessible via the API, and styles trained via the API won’t appear in the app, unless they are shared with the workspace. See Train a Custom Style for details.
Security Guidelines
  • Store tokens in environment variables, never in code
  • Use different tokens for development and production
  • Revoke tokens immediately if compromised
  • Never commit tokens to version control
  • Never share tokens publicly

Using API Keys

Include your token in the Authorization header of all requests:
curl -X POST https://api.krea.ai/generate/image/bfl/flux-1-dev \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a serene mountain landscape at sunset",
    "width": 1024,
    "height": 576
  }'

Billing

API usage consumes your workspace’s compute units—the same pool used by the Krea web app.
Failed and cancelled jobs do not consume compute units. You’re only billed for completed jobs.

Compute Costs

Different models consume different amounts of compute units: Image Models:
ModelCompute UnitsEstimated Time
Flux~5~4 seconds
Seedream 4~24~20 seconds
ChatGPT Image~183~60 seconds
Video Models:
ModelCompute UnitsEstimated Time
Veo 3~1017~5 minutes
Wan 2.5~569~3 minutes

Next Steps