Introduction
API Reference for Humanlayer Agent Endpoints
Function Calls
Request approval for function execution
Human Contacts
Generic agent-to-human outreach for help or feedback
Classifications
Agent-to-human outreach to collect structured data labels
Authentication
All API endpoints require authentication using a Bearer token. Include the token in the Authorization header:
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:
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