Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.neuralfactory.ai/llms.txt

Use this file to discover all available pages before exploring further.

API Reference

The Neural Factory REST API lets you programmatically interact with the platform — send messages to agents, manage knowledge bases, and retrieve analytics data.

Base URL

All API requests are made to your Neural Factory instance:
https://app.neuralfactory.ai/api/v1
For enterprise deployments, replace with your custom domain.

Authentication

All API requests require authentication using an API key. Include it as a Bearer token in the Authorization header:
curl -X POST https://app.neuralfactory.ai/api/v1/chat \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "...", "message": "What is our remote work policy?"}'
API keys are created and managed in the API Keys section of the admin panel.

Request format

  • All request bodies should be JSON with Content-Type: application/json
  • Dates are in ISO 8601 format
  • IDs are strings (MongoDB ObjectIds)

Response format

Successful responses return JSON with the relevant data:
{
  "status": "success",
  "data": { ... }
}

Error handling

Error responses include a status code and error message:
{
  "status": "error",
  "message": "Description of what went wrong",
  "code": "ERROR_CODE"
}

Common status codes

CodeMeaning
200Success
201Created
400Bad request — invalid parameters
401Unauthorized — missing or invalid API key
403Forbidden — insufficient permissions
404Not found — resource doesn’t exist
429Rate limited — too many requests
500Internal server error

Rate limits

API requests are subject to rate limiting based on your plan:
  • SaaS plans — Rate limits vary by subscription tier
  • Enterprise — Rate limits are configured per deployment
When rate limited, the API returns 429 Too Many Requests with a Retry-After header indicating when you can retry.

Streaming responses

Chat endpoints support streaming responses via Server-Sent Events (SSE). To receive streaming responses, set the Accept header:
curl -X POST https://app.neuralfactory.ai/api/v1/chat \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{"agent_id": "...", "message": "..."}'

Endpoint documentation

Full auto-generated endpoint documentation from the OpenAPI spec will be available here once the API specification is published. The endpoints cover: agents, knowledge bases, documents, chat, search, users, groups, toolkits, analytics, and API key management.
For now, refer to the platform’s backend API routes for available endpoints. If you need specific API guidance, contact support@neuralfactory.ai.