Crea un'immagine Runway
Genera immagini con Gen-4 Image o Gen-4 Image Turbo usando testo e immagini di riferimento.
gen4_image. Invia la tua chiave API CometAPI con autenticazione Bearer
e un corpo della richiesta JSON.
Scegli un modello e i riferimenti
Ogni richiesta richiedemodel, promptText e ratio.
gen4_image_turbo, referenceImages è obbligatorio e deve contenere da una a
tre immagini. Ogni oggetto di riferimento contiene un uri dell’immagine e un
tagfacoltativo. Usa un tag di 3-16 lettere minuscole,
cifre o trattini bassi, che inizi con una lettera. Fai riferimento a esso in promptText
come @tag, ad esempio @cat_ref.
Gli URI delle immagini accettano URL HTTPS accessibili o URI di dati immagine Base64 fino a
5 MB. Il Prompt accetta da 1 a 1.000 unità di codice UTF-16.
Scegli le dimensioni
Impostaratio su una delle coppie di dimensioni esatte nello schema. Ad esempio,
1024:1024 richiede un’immagine quadrata, 1280:720 un’immagine orizzontale e
720:1280 un’immagine verticale. Usa ratio per selezionare le dimensioni; non inviare
resolution né size con questi modelli.
Per un seed di campionamento esplicito, usa 1 fino a 4294967295. L’omissione o 0
seleziona un seed casuale. Se includi contentModeration, imposta il relativo
publicFigureThreshold su auto o low; altrimenti ometti l’oggetto.
Recupera il risultato
Salva il valoreid restituito e usa Recupera un’attività Runway.
Quando status è SUCCEEDED, leggi gli URL delle immagini generate in output.Autorizzazioni
Use your CometAPI API key.
Corpo
- gen4_image
- gen4_image_turbo
Request parameters for gen4_image.
Model ID for this request variant.
gen4_image "gen4_image"Describe the requested scene or motion in 1 to 1,000 UTF-16 code units.
1 - 1000Requested output dimensions, expressed as width:height. Choose a value listed for this model and endpoint.
1024:1024, 1080:1080, 1168:880, 1360:768, 1440:1080, 1080:1440, 1808:768, 1920:1080, 1080:1920, 2112:912, 1280:720, 720:1280, 720:720, 960:720, 720:960, 1680:720 Optional sampling seed. Use a positive integer for an explicit seed. Omission or 0 selects a random seed.
0 <= x <= 4294967295Optional array of up to three reference images. Omit it or use an empty array for text-only generation.
3Optional content moderation settings. Omit the object to use standard moderation.
Risposta
Task submitted. Save its id to retrieve task status.
Task ID for GET /runwayml/v1/tasks/{id}.
Task state, when returned.
Task submission timestamp, when returned.
Result URLs, when returned.
Failure explanation, when returned.
Machine-readable failure code, when returned.
Task estimate metadata, when returned.
Task cost metadata, when returned.