Skip to main content
Use the Twill REST API to create tasks, poll for status, and automate workflows.

Get an API key

API requests use a workspace-scoped API key.
  1. Navigate to your workspace settings
  2. Go to the API Keys section
  3. Click Create API Key
  4. Give your key a descriptive name (e.g., “CI Pipeline”, “GitHub Actions”)
  5. Optionally set an expiration date
  6. Copy the key immediately - it will only be shown once

Use the API key

Send it in the Authorization header as a Bearer token.
curl https://twill.ai/api/v1/tasks \
  -H "Authorization: Bearer $TWILL_API_KEY"

API key security

Never commit API keys to version control. Use environment variables or a secrets manager.
  • Rotate keys periodically
  • Use separate keys for different environments (dev, staging, prod)
  • Revoke keys immediately if compromised