AraiAI
Console

Endpoints & API keys

Every deployed agent is reachable from your own code. Arai issues a public endpoint and an API key per agent, so you can integrate an agent without exposing anything else in your account.

Your agent endpoint

Each agent has a stable base URL of the form:

https://api.araiplatform.co/api/v1/agents/{organization_id}/{project_id}

Run the agent by posting to …/sessions/{session_id}/invoke/wait (one JSON response) or …/sessions/{session_id}/invoke/stream (Server-Sent Events). The base URL stays the same across builds, so integrations keep working as you ship new versions of the agent behind it.

API keys

Each agent carries its own API key, separate from every other agent. Pass it in the X-Api-Key header on each request:

X-Api-Key: <your-agent-key>

Because keys are scoped to a single agent, a leaked key only ever affects that one agent — never your whole account.

Warning

Treat API keys like passwords. Keep them in a secrets manager or environment variables, never in client-side code or a committed file.

Rotating a key

Rotate a key whenever you like from the project's settings. Rotation issues a new key; update your callers to the new value, then revoke the old one. The endpoint URL is unaffected, so only the credential changes.

Calling the endpoint

A minimal authenticated call. Replace the placeholders with your agent's base URL, a session id you choose, and your key:

curl -X POST \
https://api.araiplatform.co/api/v1/agents/<org-id>/<project-id>/sessions/<session-id>/invoke/wait \
-H "X-Api-Key: $AGENT_KEY" \
-H "Content-Type: application/json" \
-d '{"input": {"messages": [{"role": "user", "content": "Hello"}]}, "user_id": "user-123"}'

View the API reference

Every agent serves its own interactive API reference (ReDoc) at …/redoc. The View API docs button in the Endpoint & API key panel opens it. It documents each route — invoke/wait, invoke/stream, feedback, and graph — with their request and response shapes.

Was this page helpful?
Edit this page