Base URL
Send every request to the API address of your deployment:- SaaS:
https://api.neuralfactory.ai - Enterprise: the API address of your own installation. Your administrator has it.
https://api.neuralfactory.ai/chat. The examples in this reference use the SaaS address.
How a call works
- Create an API key in the web app, under Integrations › API keys. On Enterprise an Admin does this; on SaaS an Admin or a Member can, on the Pro or Business plan.
- Exchange the key’s secret for a token at
POST /apikeys/token. The token lasts 24 hours. - Send
POST /chatwith the token asAuthorization: Bearer <token>, anagent_idand amessage. This starts a run. - The run works in the background. Wait for it, poll
GET /runs/{run_id}, stream it, or receive a webhook when it ends. - Read the agent’s answer from the finished run.
run_id.
Request format
POST /chattakesmultipart/form-data, because it accepts file uploads. Send its fields as form parts (-Fin curl).- Other endpoints that take a body, such as
POST /runs/{run_id}/resume, takeapplication/json. - IDs are strings. Dates are ISO 8601 strings.
- An error answers with an HTTP status and a
detailfield. See Errors.
Endpoint reference
The Endpoints section of this tab lists every operation an API key can call, generated from the platform’s own schema. Each operation names the key permission it needs. Routes that only a signed-in person can use, such as managing API keys, the Tasks list, the Inbox, toolkits and your own toolkit connections, and duplicating a workflow, are not in it.Where to go next
Your first API call
From a new key to an agent’s answer, in curl and Python.
Authentication
Tokens, permissions and what a key can reach.
Runs and results
Starting runs, polling, idempotency, pauses and cancelling.
Streaming
Follow a run as it works.
Webhooks
Get a signed POST when a run ends or pauses.
Building workflows and agents
Turn a brief into a workflow or an agent in the background.
Errors
Status codes and the messages behind them.
Rate and concurrency limits
How many runs at once, per plan, and what a
429 means.