Models

GEThttps://sangtao.ai/api/v2/models

Reference for Models.

List available AI models. Each model includes a keyed config object that defines form fields — render these dynamically instead of hardcoding.

Query Parameters

FieldTypeDescription
categorystringFilter by category: "image", "video", etc.

cURL

bash
curl "https://sangtao.ai/api/v2/models?category=image" \\
  -H "X-Api-Key: YOUR_API_KEY"

Response Fields

FieldTypeDescription
slug*stringUnique model identifier — use as model param in generation endpoints
displayName*stringDisplay name
category*stringLowercase category (see table below)
creditCost*numberBase credit cost per generation
descriptionstringModel description (nullable)
imageUrlstringModel preview image (nullable)
configobject | nullKeyed config object — each key is a param name, value is field definition (see below)

Config Field Schema

Config is a keyed object where each key is the parameter name (e.g. "aspectRatio", "numImages"). Special keys: _badges (display badges), maxRefImages (max reference image count).

FieldTypeDescription
type*stringField type: "select", "card-select", "number", "text", "toggle", "upload"
label*stringDisplay label (English)
labelVistringVietnamese label
optionsobject[]Options for select/card-select [{value, label, imageUrl?}]
defaultanyDefault value
minnumberMin value (number fields)
maxnumberMax value (number fields)
advancedbooleanIf true, show in advanced/collapsed section
optionalbooleanIf true, field is optional
creditCostMultiplierbooleanIf true, value multiplies creditCost (e.g. numImages)
Tip: When submitting a generation job, include config values as top-level params alongside prompt and model.

Example Response

json
{
  "success": true,
  "data": [
    {
      "slug": "nano-banana-2",
      "displayName": "Nano Banana 2",
      "category": "image",
      "creditCost": 5,
      "description": "Tạo ảnh AI chất lượng cao...",
      "imageUrl": "https://blob.sangtao.ai/assets/models/img-nano-banana-2.webp",
      "config": {
        "aspectRatio": {
          "type": "card-select",
          "label": "Aspect Ratio",
          "labelVi": "Tỉ lệ khung hình",
          "options": [
            { "value": "1:1", "label": "1:1", "imageUrl": "/img/config-icons/ratio-1x1.svg" },
            { "value": "16:9", "label": "16:9", "imageUrl": "/img/config-icons/ratio-16x9.svg" },
            { "value": "9:16", "label": "9:16", "imageUrl": "/img/config-icons/ratio-9x16.svg" }
          ],
          "default": "1:1",
          "advanced": true,
          "optional": true
        },
        "numImages": {
          "type": "number",
          "label": "Number of Images",
          "labelVi": "Số lượng ảnh",
          "min": 1,
          "max": 4,
          "default": 1,
          "advanced": true,
          "creditCostMultiplier": true
        }
      }
    }
  ]
}

Model Categories

CategoryDescription
imageAI image generation (GPT Image, Nano Banana, Imagen, FLUX...)
videoAI video generation (Veo, Grok...)
voiceovervideoAI voiceover video with generated images
stockvideoStock video with AI voiceover (Pexels)
slideshowvideoSlideshow video from images
inpaintImage inpainting / editing
creativevideoCreative video editor (Fast / Pro / Ultra tiers)
articlevideoArticle-to-video conversion
highlightvideoVideo highlight / clip extraction
renderVideo render pipeline
scrapeWeb scraping utility