---
title: "Introduction"
description: "API Reference for Humanlayer Agent Endpoints"
---

<CardGroup cols={2}>
  <Card
    title="Function Calls"
    icon="function"
    href="/api-reference/function-calls"
  >
    Request approval for function execution
  </Card>
  <Card
    title="Human Contacts"
    icon="message"
    href="/api-reference/human-contacts"
  >
    Generic agent-to-human outreach for help or feedback
  </Card>
</CardGroup>

## Authentication

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

```bash
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
