For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
跳至內容

Model and Request Errors

Troubleshoot ApiSmart model IDs, unsupported models, invalid request parameters, resolution errors, and model-specific request issues.

Model and request errors usually occur when a model ID is incorrect, a model is used with the wrong endpoint, or request parameters do not meet the selected model's requirements.

Use the checks below before retrying the request.

🧩 Check the Model ID

ApiSmart model IDs must match exactly.

Periods (.), hyphens (-), version numbers, and other characters cannot be changed.

For example:

glm-5.1
gpt-5.6-luna
doubao-seedance-2-0-fast
doubao-seedream-5-0

Do not replace periods with hyphens or change the version format.

An incorrectly written model ID may result in an unexpected 503, so always verify the model ID first when a request fails after changing models.

You can retrieve the current model list with:

curl https://gw.apismart.ai/v1/models \
  -H "Authorization: Bearer <your-api-key>"

Use the returned data[].id exactly as provided.

🔀 Check the Model and Endpoint

A valid model must also support the endpoint you are calling.

For example:

Error
Meaning

403 model_not_allowed

The model is not available to your API Key

403 model_not_image_capable

The model does not support the Image Generation API

403 model_not_video_capable

The model does not support the Video Generation API

403 AccessDenied

The requested model or operation is not available

Note that GET /v1/models returns the system model list, but this does not guarantee that every returned model is enabled for your API Key.

For model availability and IDs, see Models and Model IDs.

⚠️ Check the Request Body

A 400 response usually means the request format or parameters need to be corrected.

Common codes include:

Code
Check

invalid_request_error

Required parameters or request values

invalid_json

JSON syntax and formatting

InvalidParameter

Model-specific parameter values

unsupported_resolution

Resolution supported by the selected model

Before retrying, check:

  • Required parameters such as model and input content

  • JSON syntax

  • Parameter names and value types

  • Whether the parameter is supported by the selected model

  • Image, video, resolution, and input limits

Do not repeatedly retry the same 400 request without changing the invalid input.

🖼️ Image Request Issues

For image generation, check the selected model and image input limits.

Current image inputs support up to 14 reference images, with a maximum file size of 10 MB per image. Input and generated images combined must not exceed 15.

The size parameter must also use a supported preset or valid pixel dimensions.

For complete requirements, see Image Generation API.

🎬 Video Request Issues

Video parameters vary by model.

Parameters such as:

duration, resolution, size, content, ratio, image, images, and input_reference

may apply differently depending on the selected HappyHorse or Seedance model.

If you receive:

check that the requested resolution is supported by the selected video model.

For model-specific inputs, resolutions, and workflows, see Video Generation API.

✅ Quick Troubleshooting Checklist

When a model or request fails:

  1. Verify the model ID character by character.

  2. Confirm that the model supports the endpoint.

  3. Check JSON syntax and required parameters.

  4. Review model-specific input and resolution limits.

  5. Use GET /v1/models to verify the current model ID.

  6. Check HTTP Status Codes and API Errors if the issue continues.

If the problem is related to authentication, balance, or connection errors, see the corresponding troubleshooting guide instead.

➡️ Next Steps

最後更新於

這有幫助嗎?