Skip to main content
POST
cURL
Use este endpoint para criar uma tarefa de geração de imagem do Runway.

Notas de uso

  • Envie o cabeçalho obrigatório X-Runway-Version, por exemplo 2024-11-06
  • Use model: gen4_image
  • Esta rota exige pelo menos um item em referenceImages — uma solicitação apenas com texto retorna reference_images_empty

Fluxo da tarefa

1

Enviar a solicitação de geração

Envie promptText, ratio, model e pelo menos um objeto referenceImages.
2

Armazenar o id retornado

Mantenha o id retornado, porque esta rota é assíncrona.
3

Consultar a tarefa

Use Obter uma tarefa Runway. Se uma consulta imediata retornar task_not_exist, aguarde alguns segundos e tente novamente.

Autorizações

Authorization
string
header
obrigatório

Bearer token authentication. Use your CometAPI key.

Cabeçalhos

X-Runway-Version
string
obrigatório

Runway version header, for example 2024-11-06.

Corpo

application/json
promptText
string
padrão:A paper boat floating on calm water at sunrise.
obrigatório

A non-empty string up to 1000 characters.

ratio
string
padrão:1280:720
obrigatório

Aspect ratio of the output image, e.g. 1280:720.

seed
integer
padrão:1
obrigatório

Random seed for reproducible results.

model
string
padrão:gen4_image
obrigatório

The model variant to use.

referenceImages
object[]
obrigatório

An array of up to three images to be used as references. At least one item is required. referenceImages is required.

contentModeration
object
obrigatório

Resposta

200 - application/json

Task accepted.

id
string
obrigatório