APIMPAPIMP
User GuideAI APIImage APIVideo APIPublic API
Task Management

Get model param spec

Returns the field contract (type / enum / range / cap / required / aliases / location) that /api/generate/submit accepts for the given model.

SDKs, playgrounds, and docs sites can use this endpoint to auto-render parameter forms — map every field in the spec to a UI control (select / number / array input) and run the same rules as client-side validation before submitting.

GET
/api/generate/spec/{model}

Authorization

BearerAuth

AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

In: header

Path Parameters

model*string

model 名称。和 /api/generate/submit 请求体里写的一致。

Response Body

application/json

application/json

application/json

curl -X GET "https://api.apimp.ai/api/generate/spec/seedance-2.0-text-to-video"
{
  "code": 200,
  "data": {
    "id": "seedance-2.0",
    "default_action": "generate",
    "fields": {
      "prompt": {
        "location": "top_level",
        "type": "string"
      },
      "size": {
        "location": "top_level",
        "type": "string",
        "enum": [
          "16:9",
          "9:16",
          "1:1",
          "4:3",
          "3:4",
          "21:9",
          "adaptive"
        ]
      },
      "duration": {
        "location": "top_level",
        "type": "int",
        "min": 4,
        "max": 15,
        "aliases": [
          "seconds"
        ]
      },
      "images": {
        "location": "top_level",
        "type": "string_array",
        "max_items": 9
      },
      "quality": {
        "location": "metadata",
        "type": "string",
        "enum": [
          "480p",
          "720p",
          "1080p"
        ]
      },
      "generate_audio": {
        "location": "metadata",
        "type": "bool"
      }
    }
  }
}
{
  "code": 0,
  "error": {
    "message": "string",
    "type": "not_found"
  }
}
{
  "code": 404,
  "error": {
    "message": "no spec registered for model `xyz-unknown`",
    "type": "not_found"
  }
}

How is this guide?

Last updated on