Skip to content

Actors

An Actor is a recurring on-camera character for a project, with a portrait and a reference sheet. You can list and read them freely. Creating or regenerating one costs credits, so the API never charges directly: it parks a priced Approve card in the owner's chat, and the run starts only when a signed-in person approves it.

  1. Your serverAsks for an ActorThe answer is 202 with an approval id. Nothing is charged.
  2. BrainpercentParks an Approve cardIn the owner’s chat, with the price.
  3. The ownerApproves in the appOnly now is the run charged and started.
  4. Your serverPolls the ActorUntil status is ready. A failed run is refunded.
There is no approve route on the API. A card that is declined or expires charges nothing.
MethodPathNeedsCost
GET/api/v1/actors?project_id=…readFree
GET/api/v1/actors/{id}readFree
POST/api/v1/actorswriteFree to request. The approved run is charged.
POST/api/v1/actors/{id}/regeneratewriteFree to request. The approved run is charged.
GET/api/v1/actors/approvals/{id}readFree
GET/api/v1/actors

Every Actor in one of your projects. Not paginated; meta.total is the count.

Query parameters

NameTypeRequiredDescription
project_iduuidRequiredYour project
Request
curl "https://www.brainpercent.app/api/v1/actors?project_id=1f8b4518-128d-4b2c-8b81-aa3939dbb7b5" \
  -H "Authorization: Bearer $BP_KEY"
200Response
{
  "success": true,
  "data": [
    {
      "id": "4f94f23c-8be6-4808-a935-f9085e22d479",
      "project_id": "1f8b4518-128d-4b2c-8b81-aa3939dbb7b5",
      "name": "Volt",
      "role": "brand host",
      "background_story": "Volt speaks with quick energy and guides viewers through fast wins.",
      "status": "ready",
      "is_default": false,
      "origin": "generated",
      "style": "photoreal",
      "portrait_url": "https://…/portrait.png",
      "sheet": [
        {
          "view": "front",
          "label": "Front",
          "url": "https://…/front.png"
        }
      ],
      "reference_photo_count": 2,
      "stage": null,
      "error_message": null,
      "created_at": "2026-10-20T10:00:00+00:00",
      "updated_at": "2026-10-20T10:04:00+00:00"
    }
  ],
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z",
    "total": 1
  }
}
GET/api/v1/actors/:id

One Actor plus latest_job. Poll this after an approved run: status goes generating, then ready (or failed, which is refunded). latest_job.state follows the paid job: charged, processing, completed or refunded.

Request
curl https://www.brainpercent.app/api/v1/actors/4f94f23c-8be6-4808-a935-f9085e22d479 \
  -H "Authorization: Bearer $BP_KEY"
200Response
{
  "success": true,
  "data": {
    "id": "4f94f23c-8be6-4808-a935-f9085e22d479",
    "name": "Volt",
    "status": "ready",
    "portrait_url": "https://…/portrait.png",
    "latest_job": {
      "state": "completed",
      "updated_at": "2026-10-20T10:04:00+00:00"
    }
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}
POST/api/v1/actors

Ask for a new Actor. Nothing is charged here. The response is 202 with an approval_id, the credit_cost the owner will be asked to approve, and approve_in, the chat link where they approve it. The card expires at expires_at.

Request body

NameTypeRequiredDescription
project_iduuidRequiredYour project
briefstringRequiredWho the Actor is, 40 to 1500 characters
stylestringOptionalphotoreal, stylized, illustrated, render3d
reference_image_urlsstring[]Optional1 to 5 https image URLs of the real person or character
reference_actor_iduuidOptionalBuild a new Actor from the original photos stored on an existing one
green_screenbooleanOptionalAsk for a green-screen sheet
tierstringOptionalCharacter type: normal, freak, total, insects, frogs, cats, dogs, capybaras, birds
selectionobjectOptionalCharacter options, category key to a list of option keys (lowercase, digits, underscore)
thread_iduuidOptionalPut the card in an existing chat thread of the same project
Request
curl -X POST https://www.brainpercent.app/api/v1/actors \
  -H "Authorization: Bearer $BP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "1f8b4518-128d-4b2c-8b81-aa3939dbb7b5",
    "brief": "A warm, expert barista in her thirties who explains brewing simply.",
    "style": "photoreal"
  }'
202Response
{
  "success": true,
  "data": {
    "status": "awaiting_approval",
    "approval_id": "9a1c2d3e-4f50-4617-8a9b-0c1d2e3f4a5b",
    "actor_id": "4f94f23c-8be6-4808-a935-f9085e22d479",
    "reference_photo_count": 0,
    "thread_id": "c2d3e4f5-0617-4829-9a0b-1c2d3e4f5a6b",
    "credit_cost": 1.2,
    "summary": "Create an Actor",
    "expires_at": "2026-10-30T15:40:14.123Z",
    "charged": false,
    "approve_in": "https://www.brainpercent.app/chat?thread=c2d3e4f5-0617-4829-9a0b-1c2d3e4f5a6b",
    "poll_url": "/api/v1/actors/approvals/9a1c2d3e-4f50-4617-8a9b-0c1d2e3f4a5b",
    "actor_url": "/api/v1/actors/4f94f23c-8be6-4808-a935-f9085e22d479"
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}

The credit_cost in the example is illustrative; the response carries the live price for that request.

POST/api/v1/actors/:id/regenerate

Ask for a new sheet for an existing Actor. Same approval flow and 202 body as create. The Actor's original uploads are reused unless you send reference_image_urls; the current sheet keeps working until the new one is saved. 409 while the Actor is already generating.

Request body

NameTypeRequiredDescription
briefstringRequired40 to 1500 characters
stylestringOptionalphotoreal, stylized, illustrated, render3d
reference_image_urlsstring[]Optional1 to 5 https image URLs
green_screenbooleanOptionalAsk for a green-screen sheet
thread_iduuidOptionalExisting chat thread of the same project
Request
curl -X POST https://www.brainpercent.app/api/v1/actors/4f94f23c-8be6-4808-a935-f9085e22d479/regenerate \
  -H "Authorization: Bearer $BP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"brief": "Same barista, now in a bright cafe with morning light."}'
202Response
{
  "success": true,
  "data": {
    "status": "awaiting_approval",
    "approval_id": "9a1c2d3e-4f50-4617-8a9b-0c1d2e3f4a5b",
    "actor_id": "4f94f23c-8be6-4808-a935-f9085e22d479",
    "charged": false
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}
GET/api/v1/actors/approvals/:id

Where a parked card stands. There is no approve route on the API: approving is always a person in the app.

Request
curl https://www.brainpercent.app/api/v1/actors/approvals/9a1c2d3e-4f50-4617-8a9b-0c1d2e3f4a5b \
  -H "Authorization: Bearer $BP_KEY"
200Response
{
  "success": true,
  "data": {
    "approval_id": "9a1c2d3e-4f50-4617-8a9b-0c1d2e3f4a5b",
    "thread_id": "c2d3e4f5-0617-4829-9a0b-1c2d3e4f5a6b",
    "state": "approved",
    "executed": true,
    "summary": "Create an Actor",
    "credit_cost": 1.2,
    "expires_at": "2026-10-30T15:40:14.123Z",
    "decided_at": "2026-10-29T15:52:02.000Z"
  },
  "meta": {
    "timestamp": "2026-10-29T15:40:14.123Z"
  }
}

Approval states

stateMeaning
pendingWaiting for the owner. Nothing charged.
approvedApproved. When executed is true the paid run started; poll the Actor.
rejectedDeclined. Nothing ran, nothing was charged.
expiredNot answered in time. Nothing ran, nothing was charged.

Errors

StatusCodeWhen
400VALIDATION_ERRORBad id, brief too short or long, unknown field, non-https image URL
403FORBIDDENNo projects scope, or no write on a POST
404NOT_FOUNDProject, Actor, thread or approval is not yours
409CONFLICTRegenerate while the Actor is already generating
409THREAD_PROJECT_MISMATCHthread_id belongs to another project
422ACTOR_REQUEST_REJECTEDThe request cannot be prepared (the message says why)
503APPROVAL_UNAVAILABLEThe approval card could not be parked right now