sangtao.ai
API key

Account

Models

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

Authorization

  • X-Api-Keystring · headerrequired

    Your API key, from the API keys page of your account.

List available AI models. Each model includes a keyed config object that defines form fields — render these dynamically instead of hardcoding. GET /models/{slug} returns one model, in the same shape, and takes an alias too (GET /models/gpt-image-latest).

Query parameters

  • categorystring

    Filter by category (described under Model categories below)

    Available options:image

Response

  • idnumber

    Legacy — do not use. Kept for existing code; it goes away in a later version. Use slug.

  • slugstringrequired

    Unique model identifier — use as the model param when creating, e.g. "gpt-image-2.6"

  • displayNamestringrequired

    Display name

  • categorystringrequired

    Lowercase category (see Model categories below)

    Available options:image

  • creditCostnumberrequired

    Base credit cost per generation

  • descriptionstring

    Model description (nullable)

  • imageUrlstring

    Model preview image (nullable). Links here and in config (sampleOutputUrl…) are on cdn.sangtao.ai

  • aliasesstring[]

    Other names the model answers to, also accepted as model — e.g. ["gpt-image-latest"] for GPT Image. It may also hold the model’s former names; every name in the list can be sent. Empty for most models

  • serversobject[]

    Where the model can run. Every model has one for now: "standard", the default. Pass id as server when creating, or leave server out for the default

    Show child attributes
    • idstring

      The server, to send as server.

    • namestring

      Its name to show.

    • descriptionstring | null

      A short description.

    • defaultboolean

      true for the one used when server is left out.

    • creditCostnumber

      Base credit cost on this server.

    • availableboolean

      Whether it takes jobs now.

    • capabilitiesobject

      What this server can do. A key is there only when it applies.

      Show child attributes
      • resolutionsstring[]

        Values resolution takes, e.g. ["original", "1k", "2k"]. original keeps the image as the model made it, no upscaling.

      • defaultResolutionstring

        Used when resolution is left out: "original".

      • aspectRatiosstring[]

        Suggested aspectRatio values.

      • maxRefImagesnumber

        Most reference images per job.

      • formatsstring[]

        Output formats, for format.

      • transparentboolean

        Whether a transparent background can be asked for (requireTransparent).

  • configobject | 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", "imageResolution"). Special keys, not fields: _badges (string[], display badges), maxRefImages (number, max reference images).

  • typestringrequired

    Field type

    Available options:selectcard-selectnumbertexttoggleupload

  • labelstringrequired

    Display label (English)

  • labelVistring

    Vietnamese label

  • optionsobject[]

    Options for select/card-select [{value, label, imageUrl?}]

  • defaultany

    Default value

  • minnumber

    Min value (number fields)

  • maxnumber

    Max value (number fields)

  • advancedboolean

    If true, show in advanced/collapsed section

  • optionalboolean

    If true, field is optional

The GPT Image model (gpt-image-2.6, alias gpt-image-latest) has these keys:

  • aspectRatioobject

    A select field: "auto", "1:1", "16:9", "9:16"… Default "auto"

  • imageResolutionobject

    A select field with options "1k" (1K) and "2k" (2K). Default "1k" — the web picker's. Over the API the field is resolution, and leaving it out means "original" (see GPT Image)

  • maxRefImagesnumber

    A plain number, not a field: how many reference images the model takes. 20 for GPT Image

When submitting a generation job, include config values as top-level params alongside prompt and model.

Model categories

CategoryDescription
imageAI image generation (GPT Image)

The list may also hold the older video tools (video, voiceovervideo, stockvideo, slideshowvideo, articlevideo, render). They are moving to Motion and are not documented.

Errors

StatuserrorCodeWhen
404MODEL_NOT_FOUNDGET /models/{slug}: no model with this slug, or one in a category the API does not offer
GET/models
curl "https://api.sangtao.ai/v2/models?category=image" \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "success": true,
  "data": [
    {
      "id": 48,
      "slug": "gpt-image-2.6",
      "displayName": "GPT Image 2.6",
      "category": "image",
      "description": null,
      "imageUrl": null,
      "creditCost": 3,
      "config": {
        "maxRefImages": 20,
        "aspectRatio": {
          "type": "select",
          "label": "Aspect Ratio",
          "labelVi": "Tỉ lệ khung hình",
          "options": [
            {
              "value": "auto",
              "label": "Auto"
            },
            {
              "value": "1:1",
              "label": "1:1"
            },
            {
              "value": "9:16",
              "label": "9:16"
            },
            {
              "value": "16:9",
              "label": "16:9"
            }
          ],
          "default": "auto"
        },
        "imageResolution": {
          "type": "select",
          "label": "Resolution",
          "labelVi": "Độ phân giải",
          "options": [
            {
              "value": "1k",
              "label": "1K"
            },
            {
              "value": "2k",
              "label": "2K"
            }
          ],
          "default": "1k"
        }
      },
      "aliases": [
        "gpt-image-latest"
      ],
      "servers": [
        {
          "id": "standard",
          "name": "Standard",
          "description": null,
          "default": true,
          "creditCost": 3,
          "available": true,
          "capabilities": {
            "resolutions": [
              "original",
              "1k",
              "2k"
            ],
            "defaultResolution": "original",
            "aspectRatios": [
              "auto",
              "1:1",
              "9:16",
              "16:9"
            ],
            "maxRefImages": 20,
            "formats": [
              "png",
              "jpeg"
            ],
            "transparent": true
          }
        }
      ]
    }
  ]
}