Skip to main content
All API requests (except signup and health) require authentication via Bearer token.

Authentication Header

Include your API key in the Authorization header:
Authorization: Bearer sk_agt_your_api_key_here

Example Request

curl https://api.saturn-pay.com/v1/wallet \
  -H "Authorization: Bearer sk_agt_abc123def456..."

API Key Format

Saturn API keys follow this format:
sk_agt_[32 random characters]
  • sk_ — Secret key prefix
  • agt_ — Agent key identifier
  • [32 chars] — Unique identifier

Getting an API Key

Option 1: Signup (New Account)

curl -X POST https://api.saturn-pay.com/v1/signup \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent"}'
Response:
{
  "apiKey": "sk_agt_abc123...",
  "agentId": "agt_xyz789",
  "accountId": "acc_123456"
}

Option 2: Create Agent (Existing Account)

curl -X POST https://api.saturn-pay.com/v1/agents \
  -H "Authorization: Bearer sk_agt_your_existing_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "worker-2"}'

Error Responses

401 Unauthorized

Missing or invalid API key:
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

403 Forbidden

Valid key but agent is killed or lacks permission:
{
  "error": {
    "code": "AGENT_KILLED",
    "message": "Agent has been disabled"
  }
}