Base URL & Authentication
- Base URL:
https://api.animusai.co/v2 - Authentication:
Authorization: Bearer <ANIMUS_API_KEY> - Content type:
application/json
generation_id that you can use to poll status or fetch historical results later.
Create a Generation
UsePOST /generation/create to submit a single job. The API automatically infers the generation type from your payload:
- Provide
character_idto trigger a character LoRA render (face/body LoRA and face swap are enabled by default). - Provide
source_image_urlto run a Seedream photo edit. - Provide both
source_image_urlandconvert_to_video: trueto turn an image into a short video clip. - Omit both fields to default to text-to-image generation.
Request Body
| Field | Type | Default | Required | Notes |
|---|---|---|---|---|
prompt | string | — | ✅ | Text prompt used for all generation types. |
num_images | integer | 1 | ❌ | Values >1 are submitted as a batch (see below). |
character_id | string | null | ❌ | Required for character-based renders. Automatically validates subscription access. |
use_face_lora | boolean | true | ❌ | Applies the character face LoRA. Only meaningful when character_id is set. |
use_body_lora | boolean | true | ❌ | Applies the character body LoRA. |
face_swap | boolean | true | ❌ | Enables default face swap pass. |
source_image_url | string | null | ❌ | Publicly reachable image URL for photo edits or video conversion. Automatically uploaded to temporary storage when needed. |
convert_to_video | boolean | false | ❌ | Converts the output into a short MP4 clip. Requires source_image_url. |
group_id | string | null | ❌ | Attach the generation to an existing media group. |
group_title | string | auto | ❌ | Title to use when creating a new group on the fly. |
Response
A successful submission returns aGenerationResponse object:
generation_id to poll status or subscribe to webhooks in your own system. If the user lacks the required plan or credits, the endpoint returns an HTTP 402 with additional context.
Track Generation Status
UseGET /generation/status/{generation_id} to retrieve the latest status, final media URLs, and performance metadata. The endpoint works for single renders and batches alike.
num_images > 1, the status payload includes aggregate counts so you can expose progress bars in your UI.
Batch Submissions
Send multiple prompts (or the same prompt repeated) withPOST /generation/batch. The API creates a shared group automatically and returns a single batch_id you can poll through the standard status endpoint.
Organize Results with Groups
Every generation belongs to a group so you can fetch cohesive sessions or albums later.GET /generation/groupsreturns paginated groups for the authenticated organization.GET /generation/groups/{group_id}returns group metadata plus individual generations (with URLs) for galleries and download flows.
Cleanup Endpoints
You can let users curate storage directly from your product:DELETE /generation/generations/{generation_id}removes a specific job and purges all associated media from Storj.DELETE /generation/groups/{group_id}deletes the group, every generation inside it, and their assets in a single operation.
Error Handling & Credits
- HTTP
402responses indicate missing credits or subscription access for the requested character. The JSON payload includeserror,message, andcharacter_idfields so you can upsell or reroute the user. - HTTP
409responses appear when you attempt to delete a group while generations are still reconciling. Retry after active jobs finish. - Most write operations deduct credits immediately and automatically refund them if submission fails before processing. Always check
remaining_balanceon the create responses to drive UX copy.
Next Steps
- Use the status endpoint to power polling loops or push notifications.
- Combine group listings with your own asset selectors to build download or approval workflows.
- Pair these endpoints with the Animus SDK to offer one-click generation directly in chat experiences.
