Skip to main content

Base URL

All API requests should be made to:
https://dev.fabraix.com/v1

Authentication

All requests must include your API key in the x-api-key header:
curl -H "x-api-key: YOUR_API_KEY" https://dev.fabraix.com/v1/endpoint
See the Authentication guide for details.

Available Endpoints

Request Format

All POST requests should use JSON format with Content-Type: application/json:
{
  "field1": "value1",
  "field2": "value2"
}

Response Format

All successful responses return JSON with appropriate HTTP status codes:
{
  "result_field": "value",
  "timestamp": "2024-01-01T12:00:00Z"
}

Error Handling

Errors return appropriate HTTP status codes with detailed error messages:
{
  "error": {
    "message": "Detailed error description",
    "type": "error_type",
    "code": "ERROR_CODE"
  }
}

Common Status Codes

StatusDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Invalid endpoint or resource
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Rate Limits

API rate limits depend on your API key type:
Key TypeRequests/MinuteRequests/Hour
Development601,000
Production60010,000
EnterpriseCustomCustom

SDK Support

Official SDKs will be available soon for popular languages:
pip install fabraix

Pagination

For endpoints that return lists (future releases), pagination is handled via query parameters:
  • limit: Number of items to return (max 100)
  • offset: Number of items to skip
  • cursor: Cursor for cursor-based pagination
Example:
GET /v1/events?limit=20&offset=40

Versioning

The API version is included in the URL path. The current version is v1. Breaking changes will result in a new API version. Non-breaking changes may be added to the current version.

Webhooks (Coming Soon)

Future releases will support webhooks for real-time notifications:
  • Action blocked events
  • Anomaly detection alerts
  • Session completion notifications

Support

Need help with the API?

Quick Start Examples

Register a Session

curl -X POST https://dev.fabraix.com/v1/register-agent-run \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "123", "timestamp": "2024-01-01T00:00:00Z", "system_prompt": "Helper"}'

Log an Event

curl -X POST https://dev.fabraix.com/v1/event \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"trace_id": "abc", "type": "user", "content": "{}", "schema": "{}"}'

Check an Action

curl -X POST https://dev.fabraix.com/v1/check \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"trace_id": "abc", "content": "{}", "schema": "{}"}'

Handle Errors

try:
    response = client.check_action(...)
except RateLimitError as e:
    time.sleep(e.retry_after)
    response = client.check_action(...)