POST
/
v1
/
chat
/
completions
curl -X POST https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "text", "text": "Animate this image with gentle camera movement"},
          {
            "type": "image_url",
            "image_url": {
              "url": "https://example.com/image.png"
            }
          }
        ]
      }
    ]
  }'
{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Video generation started."
      }
    }
  ]
}
Generate a video from an image using the chat completions API format. Include an image_url in the message content to use an image as the starting frame.

Request Parameters

model
string
required
Model name: sora-2.
messages
array
required
Chat messages array. Include image_url content type for image-to-video generation.
stream
boolean
Whether to stream the response.
curl -X POST https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "text", "text": "Animate this image with gentle camera movement"},
          {
            "type": "image_url",
            "image_url": {
              "url": "https://example.com/image.png"
            }
          }
        ]
      }
    ]
  }'
{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Video generation started."
      }
    }
  ]
}