API Reference
The two API surfaces have different references:
- Completions API (API key): the public, contract-generated reference is at https://app.bike4mind.com/api/v1/docs, with the raw spec at https://app.bike4mind.com/api/v1/openapi.json. It lists every field and status code. See also Completions API.
- Platform REST API (JWT): the endpoints the web app itself uses. They are not individually documented here; see the sections below for conventions.
Base URL
https://app.bike4mind.com/api
Self-hosted instances use their own domain.
Authentication
Platform endpoints require a JWT unless noted otherwise:
Authorization: Bearer <jwt-token>
See Authentication & Authorization. Completions endpoints use API keys instead; create one from the Profile menu -> More -> API Keys.
Example
List your agents (see Agent System):
curl https://app.bike4mind.com/api/agents \
-H "Authorization: Bearer $JWT_TOKEN"
Pagination
GET /api/agents accepts page (default 1) and limit (default 10) query parameters and returns { data, hasMore, total }: the items for the page, whether more pages follow, and the total match count. The handler sets no maximum for limit.
Bulk notebook actions
A request to /api/sessions/bulk acts on at most 100 notebooks, whether you call it with a JWT or an API key. DELETE reads the ids from sessionIds and returns 400 with At most 100 sessions can be deleted per request above that. POST also returns 400 past 100 ids; for the favorite action the limit counts the distinct ids in add and remove together. To act on more notebooks, split the ids into batches of 100 and send one request per batch.
Errors
Errors use standard HTTP statuses. See Error Handling. Running out of credits is a 422 with errorCode: "insufficient_credits" (never 402).
On the completions endpoint, a 403 with required_scopes means the key lacks a scope. Without it, the account may be suspended or under a dispute (contact support), or a JWT caller may need to enroll in MFA in the web app.
Real-time updates
Real-time features use WebSockets rather than polling. See the Agent System page for the events agents emit.