Files
humanlayer/docs/api-reference/introduction.mdx
dexhorthy 021149207b docs and examples updates for vercel, chainlit, and more
- Add [quickstart guide for using the humanlayer typescript sdk](https://humanlayer.dev/docs/quickstart-typescript)
- Add [guide for using Function Calls for Classification](https://humanlayer.dev/docs/core/classifications) with human-in-the-loop
- Add [framework guide for using humanlayer with chainlit](https://humanlayer.dev/docs/frameworks/chainlit)
- Add [framework guide for using humanlayer with the vercel ai sdk](https://humanlayer.dev/docs/frameworks/vercel-ai-sdk)
- Update [humanlayer-ts readme](https://github.com/humanlayer/humanlayer-ts) to include quickstart guide

- Add [example of a fullstack chat app with nextjs and the vercel ai sdk](https://github.com/humanlayer/humanlayer/tree/main/examples/vercel_ai_nextjs)
- Simplify the [chainlit example](https://github.com/humanlayer/humanlayer/tree/main/examples/chainlit) by using `AsyncHumanLayer`
- Update [langchain email example](https://github.com/humanlayer/humanlayer/tree/main/examples/langchain/09-email-contact.py) to showcase the use of custom jinja templates for email payloads
2025-02-20 17:08:43 -08:00

53 lines
1.3 KiB
Plaintext

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