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.

No authentication is required. pricing reads live billing configuration in USD. billing_unit distinguishes seconds, images and calls; base_price excludes request multipliers and group discounts. base_unit means the complete billing unit is not established.

precharge is only a task reservation, not a token rate or a settlement price. Dynamic pricing exposes billing_expr and expression_usd_multiplier. When evaluation with only the model supplied succeeds, default_estimate is included; it does not guarantee that such a generation request is valid. Usage-, header- and time-dependent expressions omit this estimate. Request multipliers, user groups and final settlement can change the actual charge.

unverified_default means a price equals a known placeholder and needs confirmation; unconfigured means no configuration was found; invalid means invalid configuration. Missing amounts do not mean free service. Verified mappings for missing or placeholder prices may include reference, containing dated Gold reference tiers and their unit. applied_to_billing: false means these references do not change billing. Tier labels do not imply additional supported parameters. Runtime configuration merges defaults and saved values, so its source does not prove an administrator explicitly confirmed a price.

display_name and description provide the model family’s display name and purpose in zh and en. modality identifies the output media type (image, video, audio, or unknown), not the input type. Aliases sharing a contract share family metadata; submit requests with the selected model ID. Both individual specs and the model list return this metadata. See fields for parameter constraints.

Call examples

examples can be reused by documentation, SDK samples and mock request fixtures. Each example contains:

  • name: a stable identifier such as text_to_image or reference_to_video.
  • request: the submit method, path, headers and complete JSON body. model preserves the queried model name or alias.
  • response: the successful submit HTTP status and response body, with task status not_started.
  • result.request / result.response: the status lookup request and a completed response with status finished and files.
  • synthetic: true: explicitly marks the data as a synthetic example.

Replace YOUR_API_KEY in the Authorization header and replace reference media URLs with accessible assets. Example task IDs and output URLs are placeholders and cannot be queried or downloaded. Examples do not quote a price or promise actual timing or output. Real submissions still require authentication and follow normal account billing rules.

Every registered model has a minimal text request example. Models with a public images field also include a reference-image example when it passes contract validation. Examples are not an exhaustive list of supported modes. The mock relay shares media types and response structures, and its tests reuse these requests. Actual mock task IDs and media URLs are still generated by the execution flow.

GET
/api/generate/spec/{model}

Path Parameters

model*string

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

Response Body

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",
    "pricing": {
      "model": "seedance-2.0",
      "status": "unverified_default",
      "billing_mode": "model_price",
      "currency": "USD",
      "billing_unit": "base_unit",
      "source": "runtime_config",
      "quota_per_usd": 500000,
      "group_ratio": 1,
      "reference_only": true,
      "base_price": 0.1,
      "reference": {
        "source": "gold_reference",
        "checked_at": "2026-09-30",
        "currency": "USD",
        "billing_unit": "second",
        "applied_to_billing": false,
        "tiers": [
          {
            "variant": "480P",
            "unit_price": 0.066
          },
          {
            "variant": "480P-input",
            "unit_price": 0.04
          },
          {
            "variant": "720P",
            "unit_price": 0.142
          },
          {
            "variant": "720P-input",
            "unit_price": 0.08584
          },
          {
            "variant": "1080P",
            "unit_price": 0.3544
          },
          {
            "variant": "1080P-input",
            "unit_price": 0.21568
          },
          {
            "variant": "4K",
            "unit_price": 0.722
          },
          {
            "variant": "4K-input",
            "unit_price": 0.44432
          }
        ]
      }
    },
    "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": 404,
  "error": {
    "message": "no spec registered for model `xyz-unknown`",
    "type": "not_found"
  }
}

How is this guide?

Last updated on