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": "A dog running on the beach"},
      {"role": "assistant", "content": "Video generated successfully."},
      {"role": "user", "content": "Make the dog a golden retriever and add sunset lighting"}
    ]
  }'
{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Video updated successfully."
      }
    }
  ]
}
Use multi-turn conversations to iteratively edit and refine generated videos. Each message in the conversation history represents an editing step.

Request Parameters

model
string
required
Model name: sora-2 or sora-2-pro.
messages
array
required
Multi-turn chat messages array. Include previous conversation history for iterative editing.
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": "A dog running on the beach"},
      {"role": "assistant", "content": "Video generated successfully."},
      {"role": "user", "content": "Make the dog a golden retriever and add sunset lighting"}
    ]
  }'
{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Video updated successfully."
      }
    }
  ]
}