Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
API reference

Calls

Every call your app sends through Mubit is recorded. These operations list and read those calls, and add a rating or a correction to one.

All paths are under https://api.mubit.ai, with a management key in Authorization: Bearer. Management API covers keys, roles, pagination, retries and errors. The samples read the key from MUBIT_MANAGEMENT_KEY.

List calls

GET /api/v1/calls

Lists the recorded calls, newest first. Filter by project, model, status and time.

Role: read or higher.

Parameters
NameInTypeRequiredDescription
projectquerystringno
modelquerystringno
statusquerystring: ok, error, discardedno
created_afterquerystring (date-time)no
created_beforequerystring (date-time)no
limitqueryintegernoNumber of records to return (1-200)
cursorquerystringnoSealed pagination cursor from previous page
curl
curl "https://api.mubit.ai/api/v1/calls?project=$PROJECT_ID&limit=20" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: List of calls

Each item of data:

FieldTypeRequiredDescription
idstringyes
projectstringyes
model_requestedstringno
served_bystringno
statusstringyes
latency_msintegerno
created_atstring (date-time)yes
{
  "data": [
    {
      "id": "call_019283",
      "project": "prj_prod",
      "model_requested": "gpt-4o",
      "served_by": "adapter",
      "status": "ok",
      "latency_ms": 245,
      "created_at": "2026-10-26T11:50:00Z"
    }
  ],
  "next_cursor": null
}
Errors
StatusMeaning
400Bad request (validation, invalid_cursor, out_of_bounds)
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
500Internal server error

Get a call

GET /api/v1/calls/{call_id}

Returns one call with its request, its answer, who served it, and its timing.

Role: read or higher.

Parameters
NameInTypeRequiredDescription
call_idpathstringyes
curl
curl "https://api.mubit.ai/api/v1/calls/$CALL_ID" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: Call details

FieldTypeRequiredDescription
idstringyes
projectstringyes
requestobjectyes
responseobject, nullableno
served_bystringno
statusstringyes
latency_msintegerno
created_atstring (date-time)yes
{
  "id": "call_019283",
  "project": "prj_prod",
  "request": {
    "messages": [
      {
        "role": "user",
        "content": "Calculate tax"
      }
    ]
  },
  "response": {
    "content": "The computed tax is $15.00"
  },
  "served_by": "adapter",
  "status": "ok",
  "latency_ms": 245,
  "created_at": "2026-10-26T11:50:00Z"
}
Errors
StatusMeaning
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
404Not found
500Internal server error

Rate a call

POST /api/v1/calls/{call_id}/feedback

Rates a call up or down, with an optional comment (at most 500 characters) and correction (at most 8,000 characters): the answer the call should have given. The rating is stored with the call, as a rating in the console is.

Role: member or higher.

Parameters
NameInTypeRequiredDescription
call_idpathstringyes
Idempotency-KeyheaderstringnoUnique key for safe write retries within 24h
Request body
FieldTypeRequiredDescription
ratingstring: up, downyes
commentstringno
correctionstringno
curl
curl -X POST "https://api.mubit.ai/api/v1/calls/$CALL_ID/feedback" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rating":"down","comment":"Output missed the sales tax line item."}'

Response 200: Feedback recorded

FieldTypeRequiredDescription
idstringyes
call_idstringyes
ratingstringyes
{
  "id": "fb_09876",
  "call_id": "call_019283",
  "rating": "down"
}
Errors
StatusMeaning
400Bad request (validation, invalid_cursor, out_of_bounds)
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
404Not found
500Internal server error