API Overview
The Skytale API manages accounts, API keys, and JWT tokens. It runs on a separate server from the relay.
Base URL
https://api.skytale.shAll endpoints are prefixed with /v1/.
Authentication
Most endpoints require authentication via the Authorization header:
Authorization: Bearer sk_live_a1b2c3d4...The API accepts two credential formats:
| Format | Prefix | Use case |
|---|---|---|
| API key | sk_live_ | Account management, key management |
| JWT | eyJ | Relay authentication (issued via POST /v1/tokens) |
The only unauthenticated endpoint is POST /v1/accounts (account creation).
Request format
- Content-Type:
application/json - All request bodies are JSON objects
Response format
All responses return JSON. Successful responses return the resource directly:
{ "id": "550e8400-e29b-41d4-a716-446655440000", "email": "you@example.com", "name": "My Agent", "plan_tier": "free"}Error responses
Errors return a JSON object with an error field:
{ "error": "missing authorization header"}Status codes
| Code | Meaning |
|---|---|
200 | Success |
204 | Success (no body, used for DELETE) |
400 | Bad request (invalid input) |
401 | Unauthorized (missing or invalid credentials) |
404 | Not found |
500 | Internal server error |
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
POST | /v1/accounts | No | Create an account |
GET | /v1/accounts/me | Yes | Get current account |
POST | /v1/keys | Yes | Create an API key |
GET | /v1/keys | Yes | List API keys |
DELETE | /v1/keys/:id | Yes | Revoke an API key |
POST | /v1/tokens | Yes | Exchange key for JWT |
GET | /health | No | Health check |