Query Models and Pricing

Use your API key to see which models are currently available, and how many credits each model and feature costs.

GET /api/models
X-Api-Key: sk-live-xxxx
  • Only X-Api-Key is required; no other parameters are needed. Paid keys and trial keys see the same prices.
  • Only models currently available for use are listed. Models not listed can't be used to create tasks.
  • The query itself also counts toward your request count (see Check Usage Limits).
  • The contents are the same as the Pricing page in the console.

Response fields

Field Description
models List of models, in the recommended display order
duration_unit_seconds Number of seconds in a video billing unit, currently 5

Fields in each models entry:

Field Description
name Model name; use it in the model parameter when creating a task
sort_order Display order; lower numbers come first
actions Features this model supports and their prices, one entry per feature. See the table below.
addons Optional extra-charge items; an empty array if there are none. See the table below.

Fields in each actions entry:

Field Description
action Task type, same as action in task data
feature Feature; see "Features and their APIs" below
credits Unit price (credits)
unit Pricing unit: per_5s means one billing unit per 5 seconds (video tasks); per_task means a fixed charge once per task

Fields in each addons entry:

Field Description
action Extra-charge item; currently only prompt_enhance (prompt enhancement)
credits Extra credits charged per task, not multiplied by billing units

Features and their APIs

feature Feature Task creation API
image_to_video Image to video POST /api/tasks/video-generation (see Image to Video)
reference2video Reference to video POST /api/tasks/reference2video (see Reference to Video)
text_to_video Text to video POST /api/tasks/text2video (see Text to Video)
text_to_image Text to image POST /api/tasks/image-generation (see Create Image Tasks)
image_to_image Image to image POST /api/tasks/image-generation (see Create Image Tasks)
detect_face Face age detection POST /api/tasks/detect-face (see Face Age Detection)

Calculating a task's credits

  • When unit is per_5s: credits × number of billing units. Number of billing units = duration ÷ duration_unit_seconds, rounded up.
  • When unit is per_task: each task is charged credits.
  • If you use an addons item (for example, prompt_enhance set to true), add that item's credits, once per task.

For example, if a model's Image to Video unit price is 500 with unit per_5s, and you submit a duration of 8 seconds with prompt_enhance enabled (extra 5): 500 × 2 + 5 = 1005 credits.

The credits actually charged are the credits in the task creation response. For billing rules, see Credits and Billing.

Example response

The models and values below are for illustration only; rely on what you actually get.

{
  "models": [
    {
      "name": "YUYU_M1",
      "sort_order": 10,
      "actions": [
        { "action": "video_generation", "feature": "image_to_video", "credits": 500, "unit": "per_5s" }
      ],
      "addons": [
        { "action": "prompt_enhance", "credits": 5 }
      ]
    },
    {
      "name": "YUYU_N1",
      "sort_order": 20,
      "actions": [
        { "action": "video_generation", "feature": "image_to_video", "credits": 400, "unit": "per_5s" },
        { "action": "reference2video", "feature": "reference2video", "credits": 450, "unit": "per_5s" }
      ],
      "addons": []
    },
    {
      "name": "YUYU_M3",
      "sort_order": 30,
      "actions": [
        { "action": "image_generation", "feature": "text_to_image", "credits": 20, "unit": "per_task" }
      ],
      "addons": []
    }
  ],
  "duration_unit_seconds": 5
}

Errors

Status code Cause
401 X-Api-Key missing, key doesn't exist or has been revoked, or the trial key's credit grant has expired (see Authentication)
429 Request limit exceeded