- JWT-based access for signed-in users and frontend applications
- API key access for backend systems and automation
AUTH_URL, JWT_TOKEN, and TITAN_TOKEN where relevant. Tab labels match other integration pages so your language choice stays in sync.
When to use each token type
| Token type | Best for | Typical caller |
|---|---|---|
| JWT | Interactive sessions and browser-based apps | Dashboard, frontend clients |
| API key | Stable server-to-server automation | Backend jobs, internal services, CI workflows |
Before you begin
| Requirement | Why it matters |
|---|---|
| Auth service URL | To sign in, fetch sessions, and manage API keys |
| A Titan user account | To obtain a JWT and create user API keys |
| Required scopes | To call the Task Service and related APIs successfully |
- cURL
- Go
- TypeScript
- Python
- Rust
How authentication fits into the platform
Use a JWT
JWTs are best when a user is signed in through the dashboard or when a frontend needs to call Titan APIs on behalf of a user.Step 1: sign in
- cURL
- Go
- TypeScript
- Python
- Rust
Step 2: retrieve the active session
- cURL
- Go
- TypeScript
- Python
- Rust
Create an API key
API keys are the recommended choice for backend integrations.Step 1: obtain a JWT
You create API keys as an authenticated user, so start with a JWT.Step 2: create a scoped key
- cURL
- Go
- TypeScript
- Python
- Rust
key value securely. It is the secret your automation will use.
Common scopes
| Scope | Use it when you need to… |
|---|---|
tasks:read | List or inspect tasks |
tasks:write | Create, update, delete, or run tasks |
executions:read | Inspect execution state and history |
executions:write | Trigger and control executions |
data:read | Export results, datasets, or media |
analytics:read | Read usage or execution analytics |
billing:read | Browse billing and wallet information |
billing:write | Change plan selection and other billing mutations (when exposed by your deployment) |
Use the token in API requests
All user-facing examples in this documentation use a bearer header on Task Service calls:- cURL
- Go
- TypeScript
- Python
- Rust
- A JWT
- An API key
Best practices
| Practice | Why it matters |
|---|---|
| Use API keys for backend automation | They are more stable than user sessions |
| Use the minimum scope set | Limits blast radius if a key is exposed |
| Keep JWTs in frontend session flows only | Avoids mixing browser auth with backend automation |
| Rotate keys deliberately | Keeps long-lived integrations safer |
Troubleshooting
| Problem | What to check first |
|---|---|
401 Unauthorized | Missing bearer token or invalid token |
403 Forbidden | Token is valid but missing required scopes |
| API key creation fails | Ensure you are calling auth with a valid JWT |
| Dashboard works but backend calls fail | You may be using a session flow where an API key is needed |
Next steps
- Quickstart: run your first task
- Use the Task Service API
- Create and manage tasks
- Credits and billing — wallet, ledger, and which scopes cover billing reads vs writes
- HTTP errors and exceptions — standard and non-standard API error shapes