Documentation Index
Fetch the complete documentation index at: https://docs.sigmic.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All Task Execution API endpoints require authentication. You can authenticate using either an API key (for server-side integrations) or a JWT token (for browser-based widgets).| Method | Format | Use Case |
|---|---|---|
| API Key | sigmic_... | Server-side integrations, scripts, CI/CD |
| JWT Token | eyJ... | Browser widgets, embedded chat UIs |
For browser-based integrations where code is visible to end users, use Widget Authentication with short-lived JWTs instead of exposing API keys.
API Key Authentication
Getting Your API Key
API keys are created through the Console:- Log in to your Sigmic AI account
- Open the Console and select a project
- Go to the API Keys tab in project settings
- Click Create API Key
- Give your key a name and optional expiration
- Copy and securely store the generated key
API keys are scoped to projects. Tasks created with an API key use the configuration (MCP servers, skills, tool policies) from that key’s associated project.
Using Your API Key
Include your API key in every request using one of these methods:Option 1: Authorization Header (Recommended)
Option 2: X-API-Key Header
API Key Format
API keys follow this format:Example Request
JWT Authentication (Widgets)
For browser-based widgets and embedded UIs, use short-lived JWT tokens instead of API keys. See the Widget Authentication guide for the full setup flow.Using a JWT
Authentication Errors
| Error Code | HTTP Status | Description |
|---|---|---|
AUTH_REQUIRED | 401 | No authentication was provided in the request |
INVALID_API_KEY | 401 | The API key is invalid or has expired |
INVALID_AUTH_FORMAT | 401 | Token format not recognized |
INVALID_TOKEN | 401 | JWT is invalid or has expired |
JWT_NOT_CONFIGURED | 501 | Server does not have JWT signing configured |
ORIGIN_NOT_ALLOWED | 403 | Request origin not in widget app’s allowed origins |
Organization Context
API keys are scoped to projects, and projects belong to an organization. When you authenticate with an API key:- Tasks run using the project’s configuration (MCP servers, skills, tool policies)
- Usage is tracked at the organization level
- Only organization members with access to the project can manage its API keys
orgId and orgRole claims, which are used for authorization across all endpoints.
Security Best Practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys should only be used in server-side code. Never include them in JavaScript that runs in the browser, mobile apps, or any code that could be inspected by users.
Use environment variables
Use environment variables
Store your API key in environment variables rather than hardcoding it in your source code.
Rotate keys periodically
Rotate keys periodically
Create new API keys periodically and disable old ones. You can manage multiple keys through the Settings panel.
Use separate keys for different environments
Use separate keys for different environments
Create separate API keys for development, staging, and production environments so you can revoke them independently if needed.