POST
/
pub
/
v1
/
generations
curl --request POST \
  --url https://api.rendernet.ai/pub/v1/generations \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '[
  {
    "aspect_ratio": "1:1",
    "batch_size": 1,
    "cfg_scale": 7,
    "character": {
      "character_id": "chr_01",
      "weight": 0.6,
      "enable_facelock": true,
      "mode": "balanced"
    },
    "control_net": {
      "asset_id": "ast_01",
      "control_mode": 0,
      "name": "Normal",
      "resize_mode": 0
    },
    "facelock": {
      "asset_id": "ast_01"
    },
    "loras": [
      {
        "name": "lora_name",
        "weight": 0.5
      }
    ],
    "model": "JuggernautXL",
    "narrator": {
      "image_asset_id": "ast_imgxxxxx",
      "video_asset_id": "ast_vidxxxxx",
      "audio_asset_id": "ast_audxxxxx",
      "script": "Thank you for trying Narrator",
      "voice": "Rachel"
    },
    "prompt": {
      "negative": "nsfw, deformed, extra limbs, bad anatomy, deformed pupils, text, worst quality, jpeg artifacts, ugly, duplicate, morbid, mutilated",
      "positive": "a man looking into the camera"
    },
    "quality": "Plus",
    "sampler": "DPM++ 2M Karras",
    "seed": 1234,
    "segment": {
      "asset_id": "ast_01",
      "find": "red shirt",
      "replace": "blue shirt"
    },
    "steps": 20,
    "style": "Bokeh",
    "style_detail": {
      "name": "Black & White",
      "base_model": "flux"
    },
    "true_touch": {
      "asset_id": "ast_01",
      "enhance_strength": 0.5,
      "scale_factor": 1.5
    },
    "video_anyone": {
      "media_id": "ast_01",
      "prompt": "Camera static, a woman riding a bicycle",
      "duration": 5
    }
  }
]'
{
  "data": {
    "credits_remaining": 20,
    "generation_id": "gen_01",
    "media": [
      {
        "id": "model_01",
        "dim": {
          "height": 512,
          "width": 512
        },
        "model": "JuggernautXL",
        "status": "initiated",
        "style": "Bokeh",
        "style_detail": {
          "name": "Black & White",
          "base_model": "flux"
        },
        "type": "image"
      }
    ],
    "result": "initiated"
  },
  "err": {}
}

Start using mode in character object while generating images using character.

weight and enable_facelock are deprecated and will be removed in the future.


Example:

[
    {
        .
        .
        "character": {
            "character_id": "char_001",
            "mode": "balanced"
        }
        .
        .
    }
]

Added support for Video Anyone generation

Any attempt to produce NSFW, violent, or public figure content will result in permanent account termination.

You can use either a generated image’s media_id or an uploaded image asset’s asset_id as the input image identifier media_id for video generation, eliminating the need to re-upload images as assets.

Example request
[
    {
        "video_anyone": {
            "media_id": "ast_xxxxxxxx",
            "prompt": "A person riding a bicycle",
            "duration": 5
        }
    }
]

For video_anyone generation make sure that input image meets the following conditions to avoid generation failure:

  1. Input image aspect ratio should be either 3:5 or 5:3.
  2. Maximum characters permitted for prompt is 500 only.

When using the generation array, ensure that each object contains only one of the following properties: segment, style, model, true_touch, narrator or video_anyone. These properties have a priority order as follows:

  1. segment
  2. style
  3. model
  4. true_touch
  5. narrator
  6. video_anyone

If multiple properties are provided, the one with the highest priority will be used.

The narrator can be generated either by using a script paired with a voice(List all the available voices using GET /pub/v1/voices endpoint) or by utilizing an existing audio asset.

segment, true_touch, narrator and video_anyone generations only acknowledge parameters that are passed within their own objects.

For narrator generation make sure that video asset meets the following conditions to avoid generation failure:

  1. The maximum supported frame rate for a video asset is 30 FPS, calculated by dividing the total number of frames by the total duration.
  2. Maximum height and width of the video asset should be 1080 and 1920 respectively.

Headers

X-API-KEY
string
required

API key needed to access our public endpoints. You can find yours under the 'Account' section of the website

Body

application/json · object[]

The body is of type object[].

Response

201 - application/json

A list of submitted generation requests

The response is of type object.