Skip to main content

AI API

Endpoints for interacting with AI models through a unified provider layer. These endpoints are served by the backend API service, not the web application. They are available at the backend base URL, which may differ from the web API base URL depending on your deployment.
These endpoints are internal backend endpoints and are not exposed through the web application’s /api routes. The chat endpoint requires a valid subscription plan; other endpoints in this group do not require authentication.

Health check

Returns the availability status of configured AI providers.

Response

The status field is healthy when all providers are reachable and degraded when one or more are down.

Error response

When one or more providers fail, the response uses status: "error" and includes the error message:

List models

Returns all available AI models across providers.

Response

Errors

List models by provider

Path parameters

Response

Select model

Automatically selects the best model for a given task type.

Request body

Response

Errors

Chat completion

Send a chat completion request through the unified AI provider layer. The model is auto-selected if not specified.
This endpoint requires a valid subscription plan. Requests without a recognized plan or active Stripe subscription receive a 402 response. The requested model must also be available on your plan — see plan-based model access below.

Request headers

The following headers are required for plan enforcement:

Request body

Example request

Response

Returns a structured response with the following shape:

Errors

402 error example

403 error example

Plan-based model access

Each subscription plan grants access to a specific set of AI models. The chat endpoint enforces these limits automatically.
Admin users are automatically granted network-level access regardless of their subscription plan.

Estimate cost

Estimate the cost of a request based on token counts and model pricing.

Request body

Response

Errors