Skip to main content

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 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 your chosen video platform (Daily or LiveKit) 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 or LiveKit infrastructure
  • 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

  1. Log in to your Agent Human Dashboard
  2. Navigate to Settings → API Keys
  3. Click “New API Key”
  4. Name your key (e.g., “Development” or “Production”)
  5. Copy and save the key securely - it won’t be shown again!
API keys are shown only once. Store them securely and never commit to version control.
Store your API key as an environment variable:Linux/macOS:
Windows (PowerShell):
Or in a .env file:
Using environment variables keeps your API keys secure and out of your source code.

Step 2: Create a Session

Sessions are automatically started when created. The session is created with started status and a GPU-enabled server is immediately allocated to run the avatar.
Video Room Setup: You must provide your own Daily.co or LiveKit room configuration in the room parameter. The API will connect the avatar server to your video room.

Core Concepts

Sessions

Video conversations with avatars. Lifecycle: Started (at creation) → Ended. You provide your own Daily or LiveKit room for WebRTC video streaming.

WebRTC Streaming

Real-time audio/video communication using Daily or LiveKit infrastructure for low-latency avatar video delivery.

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 IDs are immutable and globally unique. Use them for reliable references across API calls.

HTTP Status Codes

Rate Limiting

Agent Human implements rate limiting to ensure fair usage and system stability. Limits apply per API key.

Rate Limits by Endpoint Type

Rate Limit Headers

Every API response includes rate limit information in the headers:

When Rate Limited

Response (429 Too Many Requests): You may receive a 429 response with a simple message body, for example:
Headers included:

Best Practices

Track RateLimit-Remaining in your application and slow down requests when approaching the limit.
When you receive a 429 response, wait before retrying with exponentially increasing delays.
Instead of making multiple individual requests, batch operations where the API supports it.
  • Use GET /v1/sessions to fetch all sessions at once instead of individual requests
  • Cache session data locally to reduce API calls
Cache API responses that don’t change frequently (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
Session Limits: In addition to API rate limits, your subscription plan has limits on:
  • Concurrent sessions: How many avatar sessions you can run simultaneously (e.g., Free: 2, Explorer: 5, Growth: 10, Pro: 20)
  • Total session time: Monthly minutes included in your plan
These limits are separate from API request rate limits. See the Usage endpoint to check your current usage.

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:
Recommended libraries:
  • fetch (built-in in Node.js 18+)
  • axios - Full-featured HTTP client
  • node-fetch - Node.js implementation of fetch
Recommended libraries:
  • requests - Simple and elegant HTTP library
  • httpx - Modern async-capable HTTP client
  • aiohttp - Async HTTP client/server
  • 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 logic

Respect Limits

Monitor rate limit headers and implement exponential backoff

Use HTTPS

Always use HTTPS endpoints for secure communication

Common Workflows

A typical session flow from creation to completion:
Query sessions with filters and track their status:
Always check the success field and handle errors appropriately:

Next Steps

Authentication

Learn how to authenticate with API keys

Create Session

Create and start a session with your video room

Making Avatars Talk

Send audio to create talking avatars

Need Help?

Email Support

support@agenthuman.comOur team typically responds within 24 hours
Stuck? Check our detailed endpoint documentation or reach out to our support team. We’re here to help!