API surfaces use API keys for authentication. Include your key in the Authorization header of every request.
Runtype uses Bearer token authentication. Include your API key in the Authorization header or the X-API-Key header:
API Surface endpoints follow this pattern:
Example using curl:
Example using JavaScript fetch:
Example using Python:
API Surface keys use the papi_ prefix. Find your exact endpoint URLs and keys in the Endpoints and Keys tabs of your API Surface.
Common authentication error responses:
401 Unauthorized:
Causes: Missing Authorization header, incorrect key format, or revoked key
403 Forbidden:
Causes: Key scoped to different capabilities, or insufficient permissions
Never expose API keys in client-side JavaScript, mobile apps, or public repositories. Use server-side code or secure proxy services.
If a key is exposed:
Revoked keys stop working immediately.