API Reference
Integrate your applications with the Agent Platform API.Overview
The Agent Platform API enables programmatic access to your agentic apps. Use it to:- Execute conversations
- Manage sessions
- Retrieve analytics
- Configure apps programmatically
Base URL
Authentication
All API requests require authentication via API key.Headers
Getting API Keys
- Navigate to Deploy → API Keys
- Click Generate Key
- Copy and store securely
Endpoints
Execute Conversation
Send a message and receive an agent response.Create Session
Start a new conversation session.Get Session History
Retrieve conversation history for a session.End Session
Explicitly close a session.Streaming
For real-time responses, use Server-Sent Events.Streaming Execute
Metadata
Pass contextual information with requests.Session Metadata
Stored insessionMeta memory:
Accessing in Prompts
Error Handling
Error Response Format
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
invalid_request | 400 | Malformed request |
authentication_error | 401 | Invalid API key |
not_found | 404 | Resource not found |
rate_limited | 429 | Too many requests |
internal_error | 500 | Server error |
Rate Limits
| Plan | Requests/minute | Requests/day |
|---|---|---|
| Free | 60 | 1,000 |
| Pro | 600 | 50,000 |
| Enterprise | Custom | Custom |