Skip to main content

Base URL & Authentication

  • Base URL: https://api.animusai.co/v2
  • Authentication: Authorization: Bearer <ANIMUS_API_KEY>
  • Content type: application/json
Every response includes a generation_id that you can use to poll status or fetch historical results later.

Create a Generation

Use POST /generation/create to submit a single job. The API automatically infers the generation type from your payload:
  • Provide character_id to trigger a character LoRA render (face/body LoRA and face swap are enabled by default).
  • Provide source_image_url to run a Seedream photo edit.
  • Provide both source_image_url and convert_to_video: true to turn an image into a short video clip.
  • Omit both fields to default to text-to-image generation.

Request Body

Response

A successful submission returns a GenerationResponse object:
Use 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

Use GET /generation/status/{generation_id} to retrieve the latest status, final media URLs, and performance metadata. The endpoint works for single renders and batches alike.
Example response after completion:
If you submit 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) with POST /generation/batch. The API creates a shared group automatically and returns a single batch_id you can poll through the standard status endpoint.
The response reports how many jobs were accepted, any immediate validation errors, and the total credits deducted. Each generated asset will still appear in the group and status APIs.

Organize Results with Groups

Every generation belongs to a group so you can fetch cohesive sessions or albums later.
  • GET /generation/groups returns paginated groups for the authenticated organization.
  • GET /generation/groups/{group_id} returns group metadata plus individual generations (with URLs) for galleries and download flows.
List groups:
Typical response snippet:
Group detail:

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.
Both endpoints enforce organization scoping and return summaries of what was removed.

Error Handling & Credits

  • HTTP 402 responses indicate missing credits or subscription access for the requested character. The JSON payload includes error, message, and character_id fields so you can upsell or reroute the user.
  • HTTP 409 responses 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_balance on 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.