Welcome to Agent Human API
Transform your applications with AI-powered video avatars that respond in real-time. Agent Human provides a simple REST API and WebSocket interface to generate lifelike talking head videos from audio, perfect for customer service, virtual assistants, education, and more. Architecture: We handle the complexity of real-time video generation using GPU-accelerated processing, while Daily.co manages WebRTC streaming for you. Just send audio commands and receive professional avatar video.Base URL
All API requests should be made to:What You Can Build
The Agent Human API enables you to:- Create Interactive Sessions - Start WebRTC video sessions with AI avatars using Daily.co infrastructure
- Select Professional Avatars - Choose from a library of ready-to-use avatars for your sessions
- Real-time Video Generation - Send audio and receive synchronized talking head video
- Track Analytics - Monitor session duration, status, and usage metrics
Quick Start
Get started in minutes:Step 1: Get Your API Key
Generate an API key
Generate an API key
- Log in to your Agent Human Dashboard
- Navigate to Settings → API Keys
- Click “Create New Key”
- Name your key (e.g., “Development” or “Production”)
- Copy and save the key securely - it won’t be shown again!
Set up your environment
Set up your environment
Store your API key as an environment variable:Linux/macOS:Windows (PowerShell):Or in a
.env file:Step 2: List Available Avatars
Step 3: Create a Session
Sessions are created in
created status with a Daily.co video room. Call the Start Session endpoint to activate the avatar server and transition to started status.Daily.co Integration: Each session includes a
daily_room object with the video room URL and authentication token for WebRTC connectivity.Core Concepts
Sessions
Video conversations with avatars. Lifecycle: Created → Started → Ended. Each session gets a Daily.co room for WebRTC video streaming.
Avatars
Pre-configured visual characters for video sessions. Select from available avatars to bring your AI conversations to life.
Response Format
Most/v1/* API responses include a success field. Authentication and some middleware responses may instead return an error string.
Success Responses
Error Responses
All errors include helpful messages and optional suggestions:Resource IDs
All resources use prefixed IDs for easy identification:| Resource | Prefix | Example |
|---|---|---|
| Sessions | sess_ | sess_01H3Z8G9YR3K2N5M6P7Q8W4T |
| Avatars | avat_ | avat_01H3Z8G9YR3K2N5M6P7Q8W4T |
| API Keys | ah_live_ / ah_test_ | ah_live_1234567890abcdef... |
Resource IDs are immutable and globally unique. Use them for reliable references across API calls.
HTTP Status Codes
| Status Code | Description |
|---|---|
200 | Success - Request completed successfully |
201 | Created - Resource created successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource does not exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error |
503 | Service Unavailable - Service temporarily offline |
Rate Limiting
Agent Human implements rate limiting to ensure fair usage and system stability. Limits apply per API key.Rate Limits by Endpoint Type
| Endpoint Type | Limit | Window | HTTP Status |
|---|---|---|---|
| Read Operations (GET) | 100 requests | 1 minute | 429 |
| Write Operations (POST, PUT, DELETE) | 60 requests | 1 minute | 429 |
| Session Start | 10 requests | 1 minute | 429 |
Subscription Tiers: Higher-tier subscriptions may have increased rate limits. Check your dashboard for your specific limits.
Rate Limit Headers
Every API response includes rate limit information in the headers:| Header | Description |
|---|---|
RateLimit-Limit | Maximum requests allowed in the current window |
RateLimit-Remaining | Requests remaining in the current window |
RateLimit-Reset | Seconds until the current window resets |
When Rate Limited
Response (429 Too Many Requests): You may receive a429 response with a simple message body, for example:
Best Practices
Monitor Rate Limit Headers
Monitor Rate Limit Headers
Track
RateLimit-Remaining in your application and slow down requests when approaching the limit.Implement Exponential Backoff
Implement Exponential Backoff
When you receive a 429 response, wait before retrying with exponentially increasing delays.
Batch Requests When Possible
Batch Requests When Possible
Instead of making multiple individual requests, batch operations where the API supports it.
- Use
GET /v1/sessionsto fetch all sessions at once instead of individual requests - Cache avatar lists and session data locally to reduce API calls
Cache Responses
Cache Responses
Cache API responses that don’t change frequently (avatars, session details).
Rate Limit Scope
Rate limits are applied per API key, meaning:- Different API keys have independent rate limits
- Test and production keys have separate quotas
- Team members with different keys don’t share limits
Working with the API
Prerequisites
Before you begin, ensure you have:- An Agent Human account (Sign up here)
- Your API key from the dashboard
- An HTTP client library for your language
SDK & HTTP Clients
Agent Human works with any standard HTTP client:JavaScript/Node.js
JavaScript/Node.js
Recommended libraries:
fetch(built-in in Node.js 18+)axios- Full-featured HTTP clientnode-fetch- Node.js implementation of fetch
Python
Python
Recommended libraries:
requests- Simple and elegant HTTP libraryhttpx- Modern async-capable HTTP clientaiohttp- Async HTTP client/server
Other Languages
Other Languages
- PHP: Guzzle, cURL
- Ruby: Net::HTTP, HTTParty, Faraday
- Go: net/http, resty
- Java: OkHttp, Apache HttpClient
- .NET: HttpClient, RestSharp
Best Practices
Secure Keys
Store API keys in environment variables, never in source code or version control
Handle Errors
Check
success field and handle errors gracefully with retry logicRespect Limits
Monitor rate limit headers and implement exponential backoff
Use HTTPS
Always use HTTPS endpoints for secure communication
Common Workflows
Complete Session Lifecycle
Complete Session Lifecycle
A typical session flow from creation to completion:
Filter and Monitor Sessions
Filter and Monitor Sessions
Query sessions with filters and track their status:
Error Handling Pattern
Error Handling Pattern
Always check the
success field and handle errors appropriately:Next Steps
Authentication
Learn how to authenticate with API keys
Create Session
Create a session with Daily.co room
Video Streaming Guide
Connect and stream avatar video
OpenAPI Specification
For developers building with LLMs, SDKs, or automated tooling:Download OpenAPI 3.0.3 Spec
Machine-readable API specification for SDK generation and LLM tool calling
- Complete endpoint schemas with request/response types
- Action-oriented operation IDs (
createSession,listAvatars, etc.) - Detailed examples and error codes
- Compatible with OpenAI, Claude, and SDK generators
Need Help?
Email Support
[email protected]Our team typically responds within 24 hours
API Status
status.agenthuman.comMonitor real-time API uptime and performance
Stuck? Check our detailed endpoint documentation or reach out to our support team. We’re here to help!