REST API
Use the REST API to integrate your agent into any application — mobile apps, backends, custom frontends, or third-party services.Authentication
Create an Agent API Key for server-to-server access:
[!WARNING]
The api_key is only returned once upon creation. Store it securely.
Send a Message
POST /v1/agents/:agent_id/chat
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The user’s message |
session_id | string | No | Session ID for conversation continuity |
Response
Session Management
Sessions maintain conversation context across messages. Pass the samesession_id to continue a conversation:
Integration Examples
Node.js
Python
Error Handling
| Status | Description |
|---|---|
| 401 | Missing, invalid, or improperly formatted Authorization header |
| 404 | Agent not found |
| 500 | Internal agent execution error |
Best Practices
- Reuse sessions for multi-turn conversations to preserve context
- Store API keys securely — never expose them in client-side code (e.g. front-end React apps without a proxy)

