Skip to main content

Base URL

https://agents.graphy.dev

Authorization Header

All requests require a Bearer token:
Authorization: Bearer YOUR_API_KEY

Required Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
AuthorizationBearer YOUR_API_KEYYes

Example call

curl -N https://agents.graphy.dev/api/v0/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "config": {
      "type": "column",
      "data": {
        "columns": [
          { "key": "quarter", "label": "Quarter" },
          { "key": "revenue", "label": "Revenue ($)" }
        ],
        "rows": [
          { "quarter": "Q1", "revenue": 50000 },
          { "quarter": "Q2", "revenue": 62000 },
          { "quarter": "Q3", "revenue": 58000 },
          { "quarter": "Q4", "revenue": 71000 }
        ]
      }
    },
    "userPrompt": "Change to a line chart"
  }'

API Key Security

Never expose API keys in client-side code. Call the API from your backend.
Best practices:
  • Store keys in environment variables
  • Use a secrets manager in production
  • Rotate keys periodically
  • Use separate keys for development and production

Authentication Errors

StatusErrorDescription
401AUTHENTICATION_ERRORMissing or invalid API key
403AUTHORIZATION_ERRORKey lacks required permissions
Authentication errors are not retryable. Check that:
  • The Authorization header is present
  • The header format is Bearer YOUR_API_KEY (note the space)
  • The API key is valid and active