Create media generation job
curl --request POST \
--url https://api.animusai.co/v2/generation/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"negative_prompt": "<string>",
"strength": 123,
"guidance_scale": 123,
"num_inference_steps": 123,
"seed": 123,
"width": 123,
"height": 123,
"num_images": 2,
"generation_type": "<string>",
"character_id": "<string>",
"group_id": "<string>",
"group_title": "<string>",
"use_face_lora": true,
"use_body_lora": true,
"face_swap": true,
"source_image_url": "<string>",
"convert_to_video": true
}
'import requests
url = "https://api.animusai.co/v2/generation/create"
payload = {
"prompt": "<string>",
"negative_prompt": "<string>",
"strength": 123,
"guidance_scale": 123,
"num_inference_steps": 123,
"seed": 123,
"width": 123,
"height": 123,
"num_images": 2,
"generation_type": "<string>",
"character_id": "<string>",
"group_id": "<string>",
"group_title": "<string>",
"use_face_lora": True,
"use_body_lora": True,
"face_swap": True,
"source_image_url": "<string>",
"convert_to_video": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
negative_prompt: '<string>',
strength: 123,
guidance_scale: 123,
num_inference_steps: 123,
seed: 123,
width: 123,
height: 123,
num_images: 2,
generation_type: '<string>',
character_id: '<string>',
group_id: '<string>',
group_title: '<string>',
use_face_lora: true,
use_body_lora: true,
face_swap: true,
source_image_url: '<string>',
convert_to_video: true
})
};
fetch('https://api.animusai.co/v2/generation/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.animusai.co/v2/generation/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => '<string>',
'negative_prompt' => '<string>',
'strength' => 123,
'guidance_scale' => 123,
'num_inference_steps' => 123,
'seed' => 123,
'width' => 123,
'height' => 123,
'num_images' => 2,
'generation_type' => '<string>',
'character_id' => '<string>',
'group_id' => '<string>',
'group_title' => '<string>',
'use_face_lora' => true,
'use_body_lora' => true,
'face_swap' => true,
'source_image_url' => '<string>',
'convert_to_video' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.animusai.co/v2/generation/create"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"strength\": 123,\n \"guidance_scale\": 123,\n \"num_inference_steps\": 123,\n \"seed\": 123,\n \"width\": 123,\n \"height\": 123,\n \"num_images\": 2,\n \"generation_type\": \"<string>\",\n \"character_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"group_title\": \"<string>\",\n \"use_face_lora\": true,\n \"use_body_lora\": true,\n \"face_swap\": true,\n \"source_image_url\": \"<string>\",\n \"convert_to_video\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.animusai.co/v2/generation/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"strength\": 123,\n \"guidance_scale\": 123,\n \"num_inference_steps\": 123,\n \"seed\": 123,\n \"width\": 123,\n \"height\": 123,\n \"num_images\": 2,\n \"generation_type\": \"<string>\",\n \"character_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"group_title\": \"<string>\",\n \"use_face_lora\": true,\n \"use_body_lora\": true,\n \"face_swap\": true,\n \"source_image_url\": \"<string>\",\n \"convert_to_video\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.animusai.co/v2/generation/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"strength\": 123,\n \"guidance_scale\": 123,\n \"num_inference_steps\": 123,\n \"seed\": 123,\n \"width\": 123,\n \"height\": 123,\n \"num_images\": 2,\n \"generation_type\": \"<string>\",\n \"character_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"group_title\": \"<string>\",\n \"use_face_lora\": true,\n \"use_body_lora\": true,\n \"face_swap\": true,\n \"source_image_url\": \"<string>\",\n \"convert_to_video\": true\n}"
response = http.request(request)
puts response.read_body{
"generation_id": "<string>",
"group_id": "<string>",
"status": "<string>",
"message": "<string>",
"estimated_time": 123,
"credits_deducted": 123,
"remaining_balance": 123
}{
"error": "<string>",
"message": "<string>",
"character_id": "<string>",
"group_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"character_id": "<string>",
"group_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"character_id": "<string>",
"group_id": "<string>"
}Generation
Create media generation job
Submit a prompt to generate a character image, photo edit, or image-to-video clip.
POST
/
generation
/
create
Create media generation job
curl --request POST \
--url https://api.animusai.co/v2/generation/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"negative_prompt": "<string>",
"strength": 123,
"guidance_scale": 123,
"num_inference_steps": 123,
"seed": 123,
"width": 123,
"height": 123,
"num_images": 2,
"generation_type": "<string>",
"character_id": "<string>",
"group_id": "<string>",
"group_title": "<string>",
"use_face_lora": true,
"use_body_lora": true,
"face_swap": true,
"source_image_url": "<string>",
"convert_to_video": true
}
'import requests
url = "https://api.animusai.co/v2/generation/create"
payload = {
"prompt": "<string>",
"negative_prompt": "<string>",
"strength": 123,
"guidance_scale": 123,
"num_inference_steps": 123,
"seed": 123,
"width": 123,
"height": 123,
"num_images": 2,
"generation_type": "<string>",
"character_id": "<string>",
"group_id": "<string>",
"group_title": "<string>",
"use_face_lora": True,
"use_body_lora": True,
"face_swap": True,
"source_image_url": "<string>",
"convert_to_video": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
negative_prompt: '<string>',
strength: 123,
guidance_scale: 123,
num_inference_steps: 123,
seed: 123,
width: 123,
height: 123,
num_images: 2,
generation_type: '<string>',
character_id: '<string>',
group_id: '<string>',
group_title: '<string>',
use_face_lora: true,
use_body_lora: true,
face_swap: true,
source_image_url: '<string>',
convert_to_video: true
})
};
fetch('https://api.animusai.co/v2/generation/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.animusai.co/v2/generation/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => '<string>',
'negative_prompt' => '<string>',
'strength' => 123,
'guidance_scale' => 123,
'num_inference_steps' => 123,
'seed' => 123,
'width' => 123,
'height' => 123,
'num_images' => 2,
'generation_type' => '<string>',
'character_id' => '<string>',
'group_id' => '<string>',
'group_title' => '<string>',
'use_face_lora' => true,
'use_body_lora' => true,
'face_swap' => true,
'source_image_url' => '<string>',
'convert_to_video' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.animusai.co/v2/generation/create"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"strength\": 123,\n \"guidance_scale\": 123,\n \"num_inference_steps\": 123,\n \"seed\": 123,\n \"width\": 123,\n \"height\": 123,\n \"num_images\": 2,\n \"generation_type\": \"<string>\",\n \"character_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"group_title\": \"<string>\",\n \"use_face_lora\": true,\n \"use_body_lora\": true,\n \"face_swap\": true,\n \"source_image_url\": \"<string>\",\n \"convert_to_video\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.animusai.co/v2/generation/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"strength\": 123,\n \"guidance_scale\": 123,\n \"num_inference_steps\": 123,\n \"seed\": 123,\n \"width\": 123,\n \"height\": 123,\n \"num_images\": 2,\n \"generation_type\": \"<string>\",\n \"character_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"group_title\": \"<string>\",\n \"use_face_lora\": true,\n \"use_body_lora\": true,\n \"face_swap\": true,\n \"source_image_url\": \"<string>\",\n \"convert_to_video\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.animusai.co/v2/generation/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"strength\": 123,\n \"guidance_scale\": 123,\n \"num_inference_steps\": 123,\n \"seed\": 123,\n \"width\": 123,\n \"height\": 123,\n \"num_images\": 2,\n \"generation_type\": \"<string>\",\n \"character_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"group_title\": \"<string>\",\n \"use_face_lora\": true,\n \"use_body_lora\": true,\n \"face_swap\": true,\n \"source_image_url\": \"<string>\",\n \"convert_to_video\": true\n}"
response = http.request(request)
puts response.read_body{
"generation_id": "<string>",
"group_id": "<string>",
"status": "<string>",
"message": "<string>",
"estimated_time": 123,
"credits_deducted": 123,
"remaining_balance": 123
}{
"error": "<string>",
"message": "<string>",
"character_id": "<string>",
"group_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"character_id": "<string>",
"group_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"character_id": "<string>",
"group_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Primary prompt used for generation.
Blend weight for image-to-image edits (0-1).
Fixed seed for reproducibility.
Target width of the generated asset.
Target height of the generated asset.
Number of assets to generate. Values above 1 trigger batch mode.
Required range:
x >= 1Optional manual override for the generation type.
Character identifier for LoRA-based renders.
Attach the result to an existing group.
Title to use when a new group is created.
Source image to edit or convert.
Convert the result into a short MP4 clip.
⌘I
