Usa l'API RunComfy per eseguire wan-ai/wan-2-6/flash/image-to-video. Per input e output accettati, consulta lo schema.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/wan-ai/wan-2-6/flash/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A quiet, cinematic two-shot scene in a warm, softly lit bedroom bathroom. Nostalgic, intimate, slightly comedic tone. Photorealistic, shallow depth of field, gentle camera movement. No subtitles.\n\nShot 1 [0–5s]\nContinue from the first frame. Medium two-shot at eye level. Two children sit facing each other in a white bathtub. The girl lifts a small green bar of soap to her mouth like a microphone and whispers as if singing. The boy watches closely, curious and still. Warm tungsten light, cozy bedroom softly visible in the background. Subtle water ripples.\n\nShot 2 [5–10s]\nSlow push-in to a wider side angle revealing more of the room. The girl finishes, lowers the soap, then suddenly laughs. The boy relaxes and smiles back. The tension breaks into quiet laughter. Camera holds steady as the water gently moves. End on a calm, frozen childhood moment.",
"img_url": "https://playgrounds-storage-public.runcomfy.net/tools/7313/media-files/input-1-1.png"
}'Imposta la variabile d'ambiente YOUR_API_TOKEN con la tua chiave API (gestione nel Profilo) e includi in ogni richiesta un token Bearer nell'intestazione Authorization : Authorization: Bearer $YOUR_API_TOKEN.
Invia un job di generazione asincrono e ricevi subito un request_id e URL per stato, risultati e annullamento.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/wan-ai/wan-2-6/flash/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A quiet, cinematic two-shot scene in a warm, softly lit bedroom bathroom. Nostalgic, intimate, slightly comedic tone. Photorealistic, shallow depth of field, gentle camera movement. No subtitles.\n\nShot 1 [0–5s]\nContinue from the first frame. Medium two-shot at eye level. Two children sit facing each other in a white bathtub. The girl lifts a small green bar of soap to her mouth like a microphone and whispers as if singing. The boy watches closely, curious and still. Warm tungsten light, cozy bedroom softly visible in the background. Subtle water ripples.\n\nShot 2 [5–10s]\nSlow push-in to a wider side angle revealing more of the room. The girl finishes, lowers the soap, then suddenly laughs. The boy relaxes and smiles back. The tension breaks into quiet laughter. Camera holds steady as the water gently moves. End on a calm, frozen childhood moment.",
"img_url": "https://playgrounds-storage-public.runcomfy.net/tools/7313/media-files/input-1-1.png"
}'Recupera lo stato corrente per un request_id ("in_queue", "in_progress", "completed" o "cancelled").
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
--header "Authorization: Bearer <token>"Recupera output finali e metadati per il request_id; se il job non è completo, la risposta restituisce lo stato corrente per continuare il polling.
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
--header "Authorization: Bearer <token>"Annulla un job in coda tramite request_id; i job in corso non possono essere annullati.
curl --request POST \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/cancel \
--header "Authorization: Bearer <token>"Fornisci un URL HTTPS raggiungibile pubblicamente. L'host deve consentire fetch lato server (senza login/cookie), senza rate limit eccessivo o blocco bot. Consigliato: immagini ≤ 50 MB (~4K), video ≤ 100 MB (~2–5 min a 720p). Per asset privati, URL stabili o pre-firmati.
{
"type": "object",
"title": "Schema di input",
"required": [
"prompt",
"img_url"
],
"properties": {
"prompt": {
"title": "Prompt",
"description": "La lunghezza deve essere inferiore a 1500 caratteri.",
"type": "string",
"default": "A quiet, cinematic two-shot scene in a warm, softly lit bedroom bathroom. Nostalgic, intimate, slightly comedic tone. Photorealistic, shallow depth of field, gentle camera movement. No subtitles.\n\nShot 1 [0–5s]\nContinue from the first frame. Medium two-shot at eye level. Two children sit facing each other in a white bathtub. The girl lifts a small green bar of soap to her mouth like a microphone and whispers as if singing. The boy watches closely, curious and still. Warm tungsten light, cozy bedroom softly visible in the background. Subtle water ripples.\n\nShot 2 [5–10s]\nSlow push-in to a wider side angle revealing more of the room. The girl finishes, lowers the soap, then suddenly laughs. The boy relaxes and smiles back. The tension breaks into quiet laughter. Camera holds steady as the water gently moves. End on a calm, frozen childhood moment."
},
"img_url": {
"title": "Immagine",
"description": "Il formato dell'immagine deve essere: jpg, jpeg, png, bmp, webp. La dimensione del file deve essere inferiore a 10 MB.",
"type": "string",
"validations": [
{
"validation_rule": "width_pixels>",
"validation_value": 360,
"validation_error": "La larghezza e l’altezza dell’immagine caricata devono entrambe superare 360 pixel."
},
{
"validation_rule": "height_pixels>",
"validation_value": 360,
"validation_error": "La larghezza e l’altezza dell’immagine caricata devono entrambe superare 360 pixel."
},
{
"validation_rule": "width_pixels<",
"validation_value": 2000,
"validation_error": "La larghezza e l’altezza dell’immagine caricata non devono superare 2000 pixel."
},
{
"validation_rule": "height_pixels<",
"validation_value": 2000,
"validation_error": "La larghezza e l’altezza dell’immagine caricata non devono superare 2000 pixel."
}
],
"default": "https://playgrounds-storage-public.runcomfy.net/tools/7313/media-files/input-1-1.png"
},
"audio_url": {
"title": "Audio",
"description": "Il formato audio deve essere: wav, mp3. La durata di questo audio deve essere compresa tra 3 e 30 secondi. La dimensione del file deve essere inferiore a 15 MB.",
"type": "string"
},
"duration": {
"title": "Durata",
"description": "",
"type": "integer",
"enum": [
5,
10,
15
],
"default": 5
},
"resolution": {
"title": "Risoluzione",
"description": "",
"type": "string",
"enum": [
"720P",
"1080P"
],
"default": "720P"
},
"shot_type": {
"title": "Tipo di inquadratura",
"description": "shot_type ha priorità su prompt. Ad esempio, se shot_type è impostato su \"single\", il modello genera un video con una sola inquadratura anche se prompt ne richiede più di una.",
"type": "string",
"enum": [
"multi",
"single"
],
"default": "multi"
},
"negative_prompt": {
"title": "Prompt negativo",
"description": "",
"type": "string"
},
"seed": {
"title": "Seed",
"description": "",
"type": "integer",
"maximum": 2147483647,
"minimum": 0
},
"prompt_extend": {
"title": "Espandi prompt",
"description": "Indica se espandere automaticamente il prompt per la generazione video.",
"type": "boolean",
"default": true
},
"audio": {
"title": "Genera audio",
"description": "",
"type": "boolean",
"default": true
}
}
}{
"output": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "uri",
"description": "URL immagine singola"
},
"video": {
"type": "string",
"format": "uri",
"description": "URL video singolo"
},
"images": {
"type": "array",
"description": "più URL immagine",
"items": {
"type": "string",
"format": "uri"
}
},
"videos": {
"type": "array",
"description": "più URL video",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
}RunComfy è la piattaforma principale ComfyUI che offre ComfyUI online ambiente e servizi, insieme a workflow di ComfyUI con visuali mozzafiato. RunComfy offre anche AI Models, consentire agli artisti di sfruttare gli ultimi strumenti di AI per creare arte incredibile.