Models
GET
https://sangtao.ai/api/v2/modelsReference 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
| Field | Type | Description |
|---|---|---|
| category | string | Filter 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
| Field | Type | Description |
|---|---|---|
| slug* | string | Unique model identifier — use as model param in generation endpoints |
| displayName* | string | Display name |
| category* | string | Lowercase category (see table below) |
| creditCost* | number | Base credit cost per generation |
| description | string | Model description (nullable) |
| imageUrl | string | Model preview image (nullable) |
| config | object | null | Keyed 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).
| Field | Type | Description |
|---|---|---|
| type* | string | Field type: "select", "card-select", "number", "text", "toggle", "upload" |
| label* | string | Display label (English) |
| labelVi | string | Vietnamese label |
| options | object[] | Options for select/card-select [{value, label, imageUrl?}] |
| default | any | Default value |
| min | number | Min value (number fields) |
| max | number | Max value (number fields) |
| advanced | boolean | If true, show in advanced/collapsed section |
| optional | boolean | If true, field is optional |
| creditCostMultiplier | boolean | If 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
| Category | Description |
|---|---|
| image | AI image generation (GPT Image, Nano Banana, Imagen, FLUX...) |
| video | AI video generation (Veo, Grok...) |
| voiceovervideo | AI voiceover video with generated images |
| stockvideo | Stock video with AI voiceover (Pexels) |
| slideshowvideo | Slideshow video from images |
| inpaint | Image inpainting / editing |
| creativevideo | Creative video editor (Fast / Pro / Ultra tiers) |
| articlevideo | Article-to-video conversion |
| highlightvideo | Video highlight / clip extraction |
| render | Video render pipeline |
| scrape | Web scraping utility |