Authentication

All API endpoints require authentication using a Bearer token. Include the token in the Authorization header:

Authorization: Bearer <your-token>

HumanLayer clients should support a HUMANLAYER_API_KEY environment variable to set the token in an Authorization header.

Clients should also support a HUMANLAYER_API_BASE, with a default value of https://api.humanlayer.dev/humanlayer/v1.

Base URL

The API is available at:

https://api.humanlayer.dev

Response Format

All responses are in JSON format. Error responses include an error object with message and optional code fields.

Usage Limiting

API requests are limited based on your plan’s usage credits. When you exceed your limit, requests will either:

  • Be rejected with a 400 status if default-open is disabled
  • Auto-approve if default-open is enabled