Skip to main content

Base URL

All API requests should be made to:
https://api.agenthuman.com

API Endpoints

The AgentHuman Client API (/v1/*) is designed for building applications and integrations with API key authentication.

Client API (/v1/*)

Client endpoints use API key authentication and are ideal for:
  • Building custom integrations
  • Automating sessions
  • Creating agents programmatically
  • Managing resources via API
const response = await fetch('https://jwhite.tail8bf327.ts.net/api/v1/sessions', {
  headers: {
    'x-api-key': 'ah_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  }
});

Response Format

All API responses follow a consistent JSON structure:

Success Response

{
  "success": true,
  "data": {
    // Response data
  }
}

Error Response

{
  "success": false,
  "error": "Detailed error message"
}

HTTP Status Codes

Status CodeDescription
200Success - Request completed successfully
201Created - Resource created successfully
204No Content - Request successful with no response body
400Bad Request - Invalid request parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource does not exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Server error
503Service Unavailable - Service temporarily offline

Rate Limiting

To ensure fair usage and system stability, we enforce rate limits:
Endpoint TypeLimitWindow
API Endpoints (/v1/*)60 requests1 minute
Rate limit information is included in response headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1640995200
When rate limited, you’ll receive:
{
  "success": false,
  "error": "Too many requests. Please retry after 1 minute."
}

Best Practices

  1. Store API Keys Securely: Never expose API keys in client-side code or public repositories
  2. Handle Errors Gracefully: Implement proper error handling and retry logic
  3. Respect Rate Limits: Implement exponential backoff when approaching limits
  4. Use HTTPS: Always use HTTPS for API requests
  5. Monitor Usage: Track your API usage to optimize performance

Getting Started

  1. Generate an API Key: Create an API key from your account settings
  2. Make Your First Request: Test your API key with a simple GET request
  3. Explore Endpoints: Browse the available endpoints in this documentation

Client API Reference

Endpoints for client applications and integrations

Support

Need help? Contact our support team:

Email Support

Status Page

Check API status at status.agenthuman.com