fashn-logo
FASHNAI

Image to Video

Image to Video turns a single image into a short motion clip, with tasteful camera work and model movements tailored for fashion. Provide an image and optional instructions to produce engaging 5–10 second videos at up to 1080p.

Model Specifications
  • Model Name: image-to-video
  • Lifecycle: experimental
  • Duration Options: 5s, 10s
  • Resolutions: 480p, 720p, 1080p
  • Output: MP4 video URLs
  • Credits: varies by resolution and duration

Credits

Credit consumption depends on the input parameters resolution and duration.

ConfigurationCredit Cost
resolution: 480p1 credit
resolution: 720p3 credits
resolution: 1080p6 credits
duration: 102× multiplier on base cost

Request

Animate a single image into a short video via the universal /v1/run endpoint:

POSThttps://api.fashn.ai/v1/run

Request Examples

curl -X POST https://api.fashn.ai/v1/run \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -d '{
           "model_name": "image-to-video",
           "inputs": {
             "image": "https://example.com/photo.jpg",
             "duration": 5,
             "resolution": "1080p"
           }
         }'

Response

Returns a prediction ID for status polling:

{
  "id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1-u1",
  "error": null
}

Request Parameters

Required Parameters

image
Required
image URL | base64

Source image to animate into a short video.

Base64 Format

Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)

Optional Parameters

promptstring

Optional motion guidance. Detailed prompting is not recommended because motion is difficult to control precisely. For the best results, leave this field empty and allow the system to plan motion automatically. If you choose to include guidance, keep it short and concrete, for example: "raising hand to touch face".

Default: empty string (automatic motion)

duration5 | 10

Duration of the generated video in seconds.

Default: 5

resolution480p | 720p | 1080p

Target video resolution used by the internal video engine.

Default: 1080p

Response Polling

After submitting your request, poll the status endpoint using the returned prediction ID. See API Fundamentals for complete polling details.

Successful Response

When your video completes successfully, the status endpoint will return:

{
  "id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1-u1",
  "status": "completed",
  "output": [
    "https://cdn.fashn.ai/123a87r9-4129-4bb3-be18-9c9fb5bd7fc1-u1/output_0.mp4"
  ],
  "error": null
}

The output array contains URLs to your generated MP4 video(s). The number of items reflects the workflow’s output (currently 1 video per request).

Runtime Errors

Image to Video may encounter the following errors during processing:

NameCauseSolution
ImageLoadErrorThe pipeline was unable to load the input image.For image URLs, ensure the URL is publicly accessible and returns an image Content-Type (for example, image/jpeg or image/png). For base64, prefix the string with data:image/<format>;base64, and verify that the data is valid.
ThirdPartyErrorA third-party processor failed or refused to handle the request, including policy-related refusals.Most likely caused by content restrictions enforced by supporting services. Modify inputs such as the image or prompt and retry. If the issue persists across different inputs, contact support@fashn.ai and include the prediction ID so we can investigate.
PipelineErrorAn unexpected error occurred during the execution of the pipeline.Retry the request (you will not be charged for failed attempts). If the problem continues, contact support@fashn.ai and include the prediction ID so we can investigate.

The Error Object

{
  "error": {
    "name": "PipelineError",
    "message": "Internal server error. If the problem persists, please contact support."
  }
}

Example of an error when polling the /status endpoint:

{
  "id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1-u1",
  "status": "failed",
  "error": {
    "name": "ImageLoadError",
    "message": "Error loading input image: The URL's Content-Type is not an image. Content-Type: text/plain;charset=UTF-8"
  }
}

On this page