Skip to main content
Ready in 5 minutes

Integrate your AI Agent
into any software
via REST API.

CRM, mobile app, internal tool, customer portal — if it can make an HTTP request, it can talk to your agent. The API channel is the most flexible way to embed AnyDialog into your existing software stack.

// Send a message to your agent
curl -X POST https://api.anydialog.ai/v1/chat \
-H "X-API-Key: cs_live_***" \
-d '{"message": "What is your refund policy?"}'
// Response
{ ""reply": "Refunds are accepted within 30 days...",
"tokens_used": 91,
"source": "terms-of-service.pdf" }

What your agent can do via API

The API channel is the most flexible — it unlocks every AnyDialog feature from any language or platform.

Token-based authentication

Each API key has a prefix (cs_live_*) and is stored hashed. Pass it in the X-API-Key header. Multiple keys per agent — rotate without downtime.

Session management

Pass a session_id to maintain conversation context across multiple requests. Sessions persist across API calls — the agent remembers what was said.

Conversation history

GET /v1/chat/{session}/history returns the full message log for any session. Useful for displaying chat history in your own interface.

Rate limiting

Per-key rate limits prevent abuse. Limits are configurable per plan. The X-RateLimit-Remaining header tells you how many requests you have left.

Usage monitoring

Every API call logs token usage, latency, and the session it belongs to. View per-key analytics in your AnyDialog dashboard.

Language-agnostic

The API is plain REST+JSON. Call it from Python, Node.js, PHP, Ruby, Go, Swift, Kotlin — any language that can make an HTTP request.

Set up in 5 minutes

No webhook configuration needed. Generate a key and start calling the API.

01

Generate an API key

1 min

Go to your agent settings, Integrations, API section. Click Generate API Key. Copy the key immediately — it is shown only once. Store it securely.

02

Send your first request

2 min

Use the API key in the X-API-Key header or as Bearer token. POST to /api/v1/chat with your message. The agent responds with the AI answer.

03

Manage sessions

1 min

Create sessions with POST /api/v1/chat/session. Retrieve history with GET /api/v1/chat/{session}/history. Each session maintains conversation context.

Three endpoints, complete control

The API is intentionally minimal. Three endpoints cover every use case.

POST

/v1/chat

Send a message and receive a reply. Supports session_id for multi-turn conversations.

GET

/v1/chat/{session}/history

Retrieve the full conversation history for a session — all messages, timestamps, and token counts.

POST

/v1/chat/session

Create a new session explicitly and get back a session_id. Optional — you can also let sessions be created implicitly on first message.

Good to know

Honest notes for developers integrating via API.

  • Rate limits apply per API key. Each key has a configurable rate limit (requests per minute). If you exceed it, you receive a 429 response. Monitor X-RateLimit-Remaining in response headers.
  • No WebSocket support — REST only. The API is HTTP/REST. There is no WebSocket or streaming endpoint currently. Responses are returned as a single JSON object, not streamed token by token.
  • Session expiry after inactivity. Sessions that receive no messages for 24 hours are considered ended. A new message with the same session_id will start fresh. Store conversation history client-side if you need longer persistence.
  • Agent must be published. An agent in draft mode will not answer API requests. Make sure you publish your agent from the workspace before going live with your integration.

API access

Full REST API from Starter.

Plan Price API
Starter Recommended
€49/mo
€39/mo annual (save 20%)
Get started
Professional
€149/mo
€119/mo annual (save 20%)
Get started
Business
€299/mo
€239/mo annual (save 20%)
Get started
Enterprise
€599/mo
€479/mo annual (save 20%)
Get started

Your agent. Inside any software.
Three endpoints. Five minutes.

Get your API key free and start building. No credit card required.