character-gen-app
) calls so your own tooling can mirror the workflow end to end.
All endpoints live under https://api.animusai.co/v2
and accept the same bearer token you use for the rest of the Animus platform.
1. Create a Character Shell
Every pipeline starts with a character record:character_id
; you will use it in every subsequent step.
To fetch or update characters later:
GET /characters
— paginated list scoped to your organizationGET /characters/{character_id}
— detailed record including wizard step progressPUT /characters/{character_id}
— rename or tweak the description
2. Upload Reference Photos
LoRA quality is driven by clean, high-resolution inputs. Submit photos with multipart uploads.- Face images must be at least 512x512 and pass validation (sharpness, corruption checks, optional captioning).
- Default caps are 20 face images and 40 body images per character.
- HTTP
400
responses include a human-readabledetail
describing validation failures.
GET /{character_id}/assets
and filter client-side by asset_type
.
3. (Optional) Auto-generate Face Variations
If you only have a handful of selfies, Seedream augmentation can bootstrap a larger face dataset:- The backend queues a background job per prompt (defaults to our tuned list if you omit
prompts
). - Credits are deducted up front (0.5 per synthesized face). Insufficient balances return HTTP
402
witherror
,message
, and credit metadata. - Track progress via
job_id
usingGET /upload-job/{job_id}/status
(the same endpoint the studio surfaces in the UI).
4. Build and Review the Training Dataset
Once front/back body references are in place you can ask ComfyDeploy to generate a curated dataset:GET /{character_id}/dataset/status
— overall counts (total_images
,approved_images
,dataset_status
)GET /{character_id}/dataset/images?approved_only=false
— full list including prompts, seeds, andview_url
linksPUT /{character_id}/dataset/images/{image_id}/approval
— approve or rejectPOST /{character_id}/dataset/images/{image_id}/regenerate
— retry a single pose with a fresh promptDELETE /{character_id}/dataset/images/{image_id}
— purge unsuitable renders
{ success, message }
payloads so you can optimistically update your UI.
When everything looks good, call POST /{character_id}/dataset/approve
to advance the character to the training step.
5. Launch LoRA Training
Two dedicated endpoints kick off the Replicate-backed training runs:job_id
plus current balance snapshot. Use the monitoring endpoints for dashboards or Slack alerts:
GET /{character_id}/training/status
— high-level face/body job summariesGET /{character_id}/training/jobs
— full job history with timestamps and statusesGET /{character_id}/training/jobs/{job_id}/logs?lines=100
— tail of the training logs (handy for surfacing ETA and phase changes)GET /{character_id}/training/complete-status
— convenience wrapper the studio uses to decide whether the user can proceedPOST /{character_id}/training/jobs/{job_id}/cancel
— best-effort cancellation if a run stalls
402
with contextual metadata when the requester lacks the credits required for the operation.
6. Verify Generation Readiness
Before exposing generations to the user, confirm both LoRAs are live:face_lora.status
, body_lora.status
, and a boolean generation_ready
flag—the same signal the studio consumes.
7. Trigger Generations
With LoRAs in place you can use the unified media endpoints documented in the Image Generation guide. That document covers job submission (POST /generation/create
), status polling, gallery groups, and deletion tools. The production frontend uses those exact endpoints for every render, edit, and batch it ships today.
Error Semantics & Credits
All routes share a consistent error contract:402
— insufficient credits or missing character subscription. The body carrieserror
,message
,required_credits
, andcurrent_balance
fields.404
— the character or specific dataset/training record does not exist within your organization.409
— you attempted to advance the pipeline while prerequisite steps are unfinished (for example, approving a dataset with pending images).
remaining_balance
returned from one step is immediately reusable in later surfaces.
Following this sequence mirrors exactly what the production
character-gen-app
Vercel deployment does today. When paired with the generation endpoints, you have everything needed to recreate the full Animus creator studio experience inside your own enterprise dashboards.