ToAPIs
    AccueilToAPIs
    Génération d'imagesGPT Image 2.6, Gemini, FLUX…Génération de vidéosSeedance, Veo, Kling, Sora…Chat et rédactionGPT-5.6, Claude, DeepSeek…Voix et musiqueVoix off, TTS, audio
    Nouvelle sortieSeedance 2.5
    TarifsDocumentation APIMCP
    BlogAlternatives
    Se connecterCommencer gratuitement
    Tous les modèlesTarifsDocumentation APIMCPBlogAlternatives
    Se connecterCommencer gratuitement

    Langue

    1. Accueil
    2. Blog
    3. Tutoriel
    4. Google Veo 3 & Veo 3.1 Fast API: Setup Guide for ComfyUI and Python Workflows
    Retour à tous les articles
    tutorial2026-11-247 min de lecture

    Google Veo 3 & Veo 3.1 Fast API: Setup Guide for ComfyUI and Python Workflows

    A production setup guide for ToAPIs Veo 3.1 models in Python and ComfyUI: documented IDs veo3.1-fast and veo3.1-lite versus the official Vertex-connected family, 720p limits, polling, and the absence of a first-party ComfyUI node.

    ToAPIs Engineering & Evaluation Team
    Veo 3.1Video APITutorialPythonComfyUI
    TL;DR - Points clés
    • The live ToAPIs catalog on 2026-11-24 is a Veo 3.1 family, not a draft ID such as google-veo-3 or google-veo-3-1-fast. The Veo3 Video Generation reference documents veo3.1-fast and veo3.1-lite. A separate Veo3 Official Video Generation reference documents Veo3.1-fast-official, Veo3.1-lite-official, and Veo3.1-quality-official (capital V in the official request examples). These two families do not share the same body fields.
    • On the gateway Veo3 path, duration is fixed at 8 seconds. aspect_ratio is 16:9 or 9:16. metadata.resolution defaults to 720p; 1080p is documented for veo3.1-lite only. veo3.1-fast is 720p only, which matches the live Veo 3.1 Fast model-guide page.
    • The official family uses size (16:9 or 9:16) rather than aspect_ratio as its aspect field, supports duration 4, 6, or 8 seconds, and adds official-only metadata such as generateAudio, negativePrompt, personGeneration, lastFrame, and referenceImages. image_urls and metadata.referenceImages cannot be used together. Veo3.1-lite-official documents 720p and 1080p; quality-official and fast-official also list 4k (preview).
    • There is no official ToAPIs ComfyUI custom node or install path in the docs or model-guide pages checked on 2026-11-24. Integrate with the documented HTTP API from Python, and, if you work in ComfyUI, call the same endpoints from a generic HTTP node. Do not install an unofficial package that claims to be a first-party ToAPIs node.
    • Submit to POST /v1/videos/generations with Authorization: Bearer <API_KEY>, poll GET /v1/videos/generations/{task_id}, and on completed read result.data[0].url. Official examples use https://toapis.com (mainland China: https://toapis.cn). Videos are retained for 30 days. Quote model-guide rates only as a dated snapshot; the account catalog is authoritative.

    Google Veo 3 & Veo 3.1 Fast API: Setup Guide for ComfyUI and Python Workflows

    Target Model: veo3.1-fast (also veo3.1-lite; official family: Veo3.1-fast-official, Veo3.1-lite-official, Veo3.1-quality-official)
    Inference Endpoint: https://toapis.com/v1/videos/generations
    Related: Veo 3 API pricing breakdown · Sora 2 third-party access · OpenAI Sora 2 API guide · Veo3 Video Generation · Veo3 Official Video Generation


    1. TL;DR & Performance Overview

    The schedule title still says “Google Veo 3 & Veo 3.1 Fast.” On the pages checked on 2026-11-24, the live ToAPIs catalog is a Veo 3.1 family. There is no live model-guide page for veo3, veo-3, or veo3-fast (those slugs return the title Model Guide Not Found). Planning drafts that send google-veo-3 or google-veo-3-1-fast do not match any official reference fetched today.

    What is documented:

    • Gateway family — Veo3 Video Generation: public IDs veo3.1-fast and veo3.1-lite. Duration is a fixed 8 seconds. aspect_ratio is 16:9 or 9:16. metadata.resolution defaults to 720p; 1080p is documented for veo3.1-lite only. The live Veo 3.1 Fast model guide agrees: max resolution 720p, billed per request.
    • Official family — Veo3 Official Video Generation: a different contract, described as a direct connection to Google Vertex AI. Request examples use Veo3.1-quality-official, Veo3.1-fast-official, and Veo3.1-lite-official (capital V). Duration is 4, 6, or 8 seconds (default 8). Aspect is the size field (16:9 or 9:16). Resolution is a top-level field. Official-only metadata includes generateAudio, negativePrompt, personGeneration, lastFrame, referenceImages, compressionQuality, and resizeMode.
    • Auth and poll: Authorization: Bearer <API_KEY>. POST /v1/videos/generations, then GET /v1/videos/generations/{task_id}. Ordinary tasks may also be queried with GET /v1/tasks/{id}. Official examples use https://toapis.com (mainland China: https://toapis.cn).
    • ComfyUI: no official ToAPIs custom node was published on the pages checked today. The honest path is Python (and a generic HTTP node if you stay inside ComfyUI).
    • Prices: quote model-guide figures only as a 2026-11-24 snapshot. The account catalog is authoritative. See the companion pricing breakdown.

    2. Official IDs, Two Contracts, and Resolution Limits

    Do not treat “Veo 3” as a single model string. The English docs sitemap on 2026-11-24 lists /api-reference/videos/veo3/generation and /api-reference/videos/veo3-official/generation. Paths such as /videos/veo-3/generation or /videos/veo3.1-fast/generation were not in that sitemap.

    Gateway Veo3 (veo3.1-fast, veo3.1-lite)

    FieldDocumented values (2026-11-24)
    modelveo3.1-fast (default on that page), veo3.1-lite
    promptRequired
    durationFixed 8
    aspect_ratio16:9, 9:16
    image_urlsPublic http(s) URLs only; base64 is not accepted; max 10MB; .jpeg, .jpg, .png, .webp
    metadata.generation_typeframe (frame-to-video) or reference. If omitted, 2 images select frame mode and 3 images select reference mode
    metadata.resolution720p (default); 1080p for veo3.1-lite only

    The live Veo 3.1 Fast model-guide key-parameters table also lists resolution as 720p only. Playground field tests in this repository make the same split (veo3.1-fast → 720p; veo3.1-lite → 720p and 1080p), but the API reference and model-guide pages are the contract you should implement.

    Official Veo3 (Veo3.1-*-official)

    The official page default is Veo3.1-quality-official. Model-guide titles use lowercase display names (veo3.1-fast-official), but the request examples and “use the fixed value” lines on those guides use the capital-V strings. Send the documented request IDs:

    FieldDocumented values (2026-11-24)
    modelVeo3.1-quality-official, Veo3.1-fast-official, Veo3.1-lite-official
    promptRequired
    duration4, 6, or 8 (default 8)
    size16:9 (default), 9:16
    resolutionOfficial API reference: 720p (default), 1080p, 4k (preview). The lite-official model guide lists 720p and 1080p only — do not assume 4k on lite-official
    image_urlsFirst-frame URL; only the first URL in the array is used. Mutually exclusive with metadata.referenceImages
    metadata.generateAudioDefault false
    metadata.negativePromptOptional
    metadata.personGenerationallow_adult or dont_allow
    metadata.lastFrameLast-frame URL; only has effect together with image_urls
    metadata.referenceImagesStyle/asset references, maximum 3; not used as the starting frame; cannot be combined with image_urls
    metadata.compressionQualityoptimized (default) or lossless
    metadata.resizeModepad or crop

    Both families retain generated videos for 30 days. Upload local images first; do not send base64 in image_urls.

    Abstract request panel flowing through a hexagonal gateway with a polling orbit into an output frame

    Figure 1: Submit a documented Veo request, poll GET /v1/videos/generations/{task_id} until completed, then read result.data[0].url. The same HTTP path is what a generic ComfyUI HTTP node should call.


    3. Production Implementation: Python, cURL, and an Honest ComfyUI Path

    Step 1: cURL for gateway veo3.1-fast (720p, 8 seconds)

    bash
    curl --request POST \
      --url https://toapis.com/v1/videos/generations \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "veo3.1-fast",
        "prompt": "Dolphins jumping in the blue ocean",
        "duration": 8,
        "aspect_ratio": "16:9",
        "image_urls": [
          "https://example.com/start-frame.jpg",
          "https://example.com/end-frame.jpg"
        ],
        "metadata": {
          "generation_type": "frame",
          "resolution": "720p"
        }
      }'
    

    1080p on the gateway family requires veo3.1-lite:

    bash
    curl --request POST \
      --url https://toapis.com/v1/videos/generations \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "veo3.1-lite",
        "prompt": "Dolphins jumping in the blue ocean",
        "duration": 8,
        "aspect_ratio": "16:9",
        "metadata": {
          "resolution": "1080p"
        }
      }'
    

    Official-family example (capital-V model ID, size instead of aspect_ratio):

    bash
    curl --request POST \
      --url https://toapis.com/v1/videos/generations \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{
        "model": "Veo3.1-fast-official",
        "prompt": "A dolphin leaping through crystal blue ocean waters",
        "duration": 8,
        "size": "16:9",
        "resolution": "720p",
        "metadata": {
          "generateAudio": false,
          "negativePrompt": "blurry, low quality"
        }
      }'
    

    Poll:

    bash
    curl --request GET \
      --url 'https://toapis.com/v1/videos/generations/<task_id>' \
      --header 'Authorization: Bearer <token>'
    

    Step 2: Python with a bounded poller

    python
    import os
    import time
    import random
    import requests
    
    BASE = "https://toapis.com"  # mainland China: https://toapis.cn
    HEADERS = {
        "Authorization": f"Bearer {os.environ['TOAPIS_API_KEY']}",
        "Content-Type": "application/json",
    }
    
    
    def submit_veo31_fast(prompt: str, aspect_ratio: str = "16:9") -> str:
        response = requests.post(
            f"{BASE}/v1/videos/generations",
            headers=HEADERS,
            json={
                "model": "veo3.1-fast",
                "prompt": prompt,
                "duration": 8,
                "aspect_ratio": aspect_ratio,
                "metadata": {"resolution": "720p"},
            },
            timeout=30,
        )
        response.raise_for_status()
        return response.json()["id"]
    
    
    def poll_video(task_id: str, deadline_s: int = 600, interval: int = 10) -> dict:
        start = time.time()
        time.sleep(5)
        wait = interval
        while time.time() - start < deadline_s:
            poll = requests.get(
                f"{BASE}/v1/videos/generations/{task_id}",
                headers=HEADERS,
                timeout=15,
            )
            if poll.status_code == 429:
                retry_after = int(poll.headers.get("Retry-After", wait))
                time.sleep(retry_after + random.uniform(0, 1))
                wait = min(wait * 2, 120)
                continue
            poll.raise_for_status()
            data = poll.json()
            status = data.get("status")
            if status == "completed":
                item = data["result"]["data"][0]
                return {"url": item["url"], "expires_at": data.get("expires_at")}
            if status == "failed":
                raise RuntimeError(f"Generation failed: {data.get('error')}")
            time.sleep(wait + random.uniform(0, 1))
        raise TimeoutError(f"Task {task_id} still running after {deadline_s}s — query it before resubmitting")
    
    
    if __name__ == "__main__":
        task_id = submit_veo31_fast("Dolphins jumping in the blue ocean")
        print("task:", task_id)
        result = poll_video(task_id)
        print(result)
    

    Step 3: ComfyUI without inventing a first-party node

    As of 2026-11-24, official ToAPIs documentation and the Veo model-guide pages do not describe a ToAPIs ComfyUI custom node, a pip/git install path, or a first-party node name. This guide therefore does not tell you to “install the ToAPIs ComfyUI custom node.”

    If you orchestrate shots in ComfyUI, keep the documented HTTP contract:

    1. Build the same JSON body you would send from Python (model, prompt, duration, and the field names that belong to that family).
    2. Use a generic HTTP request node (or a small Python helper node you maintain) to POST https://toapis.com/v1/videos/generations with Authorization: Bearer <API_KEY> and Content-Type: application/json.
    3. Store the returned id. Poll GET /v1/videos/generations/{id} until status is completed or failed, with a 5–10 second interval, jitter, and a bounded timeout. Official status docs recommend at least 5–10 seconds and honoring Retry-After on 429.
    4. On completed, read result.data[0].url and download the file into your ComfyUI workflow. Do not assume a top-level video_url field.
    5. Treat any community pack that claims to be an official ToAPIs node as unofficial until a first-party docs page exists.

    That is still a ComfyUI workflow — it just does not invent a package that is not in the official catalog.


    4. Error Handling & Status Matrix

    A successful HTTP query is not a completed video. Always read task status. See the error reference and Get Video Task Status.

    HTTP or task stateCommon categoryRecommended action
    400Wrong family body (for example aspect_ratio on an official ID, or 1080p on veo3.1-fast), missing prompt, or both image_urls and referenceImagesMatch the body to the family; keep veo3.1-fast at 720p; use only one of image_urls or metadata.referenceImages on the official path
    401Missing or invalid API keyConfirm Authorization: Bearer <API_KEY>. Official Veo pages do not document extra auth scopes
    429Rate or concurrency limitHonor Retry-After; back off with jitter
    5xx or client timeoutTemporary gateway or upstream issueQuery the existing task id before resubmitting
    status: queued or in_progressNot an errorContinue polling on GET /v1/videos/generations/{task_id}
    status: failedGeneration did not succeedRead error.message. Official docs do not state that failed tasks are always unbilled
    invalid apitype: -1 (model-guide FAQ)Request sent to the wrong endpoint, often a chat endpointSubmit the documented video generation path and poll the video status path

    WaitTime=min⁡(MaxWait,BaseInterval×2attempt)+Uniform(0,1)\text{WaitTime} = \min(\text{MaxWait}, \text{BaseInterval} \times 2^{\text{attempt}}) + \text{Uniform}(0, 1)WaitTime=min(MaxWait,BaseInterval×2attempt)+Uniform(0,1)


    5. Pricing & FinOps ROI

    Quote only what the live model-guide pages showed on 2026-11-24, and treat those figures as a snapshot. Final billing follows the current account pricing catalog and the actual cost fields on the task.

    • Veo 3.1 Fast: planning reference $0.14 per request at 720p, per_request. The page itself says the displayed value is a planning reference.
    • veo3.1-lite: planning reference 14 credits / request. That page does not publish a USD table or a 720p-versus-1080p split.
    • Official guides quote credits per second: fast-official 16 credits/second, lite-official 4.8 credits/second, quality-official 64 credits/second. They do not publish a per-resolution USD table.

    Do not invent per-second USD rates, Vertex AI list prices, or “2x faster / sub-25 second” latency claims. Choose veo3.1-fast when you need a fixed 8-second 720p draft; switch to veo3.1-lite when you need documented 1080p on the gateway family; use the official family when you need 4/6/8-second durations, generateAudio, or keyframe fields. Compare the two families in the pricing article.


    6. Frequently Asked Questions

    See the FAQ block in frontmatter. Summary: use documented Veo 3.1 IDs, not draft google-veo-3 strings; keep veo3.1-fast at 720p; do not invent a first-party ComfyUI node; poll GET /v1/videos/generations/{task_id} and read result.data[0].url; treat model-guide rates as a dated snapshot.


    7. Action Checklist

    • Pick a family first: gateway (veo3.1-fast / veo3.1-lite) or official (Veo3.1-*-official), and use that page’s field names.
    • Never send google-veo-3 or google-veo-3-1-fast unless an official page starts documenting them.
    • Keep veo3.1-fast at 720p / 8 seconds; use veo3.1-lite when you need gateway 1080p.
    • Authenticate with Authorization: Bearer <API_KEY> and call POST /v1/videos/generations.
    • Poll GET /v1/videos/generations/{task_id} with a bounded timeout; read result.data[0].url only after completed.
    • In ComfyUI, call the same HTTP API from a generic node; do not install an undocumented “official ToAPIs node.”
    • Upload images first; do not send base64 in image_urls. On the official path, do not combine image_urls with referenceImages.
    • Price from the live catalog; treat 2026-11-24 model-guide figures as snapshots.
    • Download finished videos before expires_at (documented 30-day retention).

    Découvrir les modèles cités dans cet article

    Google (Gemini)VIDEO

    Veo 3.1 Fast

    Tarif actuel : 28 credits /request
    Guide du modèleEssayer dans la consoleObtenir une clé d'API
    Google (Gemini)VIDEO

    veo3.1-lite

    Tarif actuel : 14 credits /request
    Guide du modèleEssayer dans la consoleObtenir une clé d'API
    Google (Gemini)VIDEO

    veo3.1-fast-official

    Tarif actuel : 16 credits /second
    Guide du modèleEssayer dans la consoleObtenir une clé d'API

    Articles associés

    tutorial2026-11-23T10:00:00+08:008 min de lecture

    OpenAI Sora 2 API Reference: Endpoints, Bearer Auth, and Character Creation

    Documented ToAPIs Sora 2 API reference (sora-2-vvip, sora-2, sora-2-pro, character creation, remix, Bearer auth) plus 2026-11-25 production availability warning and live video alternatives.

    TO
    ToAPIs Engineering & Evaluation Team
    #Sora 2
    comparison2026-11-24T10:00:00+08:008 min de lecture

    Veo 3 API Pricing Breakdown: 720p vs 1080p Generation Costs Compared

    A 2026-11-24 snapshot of ToAPIs Veo 3.1 pricing: veo3.1-fast is 720p-only at $0.14 per request, lite and official guides do not publish a 720p-versus-1080p USD split, and the account catalog remains authoritative.

    TO
    ToAPIs Engineering & Evaluation Team
    #Veo 3.1
    tutorial2026-11-23T10:00:00+08:008 min de lecture

    Building Precision Image-to-Video Pipelines with Wan 2.6 R2V API

    A production guide to Wan 2.6 image-to-video and reference-video (R2V) on ToAPIs: documented public IDs wan2.6 and wan2.6-flash, routing rules, metadata parameter placement, resolution vs aspect_ratio behavior, polling, and live pricing.

    TO
    ToAPIs Engineering & Evaluation Team
    #Wan 2.6
    ToAPIs
    AccueilToAPIs
    Passerelle d'API d'IA pour l'entreprise. Accédez à GPT-5, Claude, Gemini et plus de 200 modèles via une API unifiée.

    Modèles populaires

    • Seedance 2.5 API
    • Seedance 2.0 API
    • Veo 3.1 Fast API
    • Kling 3.0 Turbo API
    Afficher plusAfficher moins
    • GPT Image 2 API
    • Claude Opus 4.8 API
    • Nano Banana 2 API
    • Seedance 2 Mini API
    • Tous les modèles

    Catégories d'API

    • API image IA
    • API vidéo IA
    • API texte-vers-vidéo
    • API image-vers-vidéo
    Afficher plusAfficher moins
    • API d'édition d'image IA
    • API LLM et raisonnement
    • Tous les outils API →

    Alternatives

    Alternatives
    • Alternative à Kie.ai
    • Alternative à Fal.ai
    • Alternative à OpenRouter
    • Alternative à Replicate
    • Alternative à Wavespeed AI
    • Toutes les comparaisons →

    Guides à la une

    Guides à la une
    • Tarifs de Seedance 2.0 et 2.5
    • Guide de l'API Seedance la moins chère
    • Guide d'intégration de MiniMax H3
    • Clé d'API Seedance 2 gratuite
    • Démarrage rapide de l'API Seedance 2
    • Tous les articles techniques →

    Développeurs et plateforme

    Développeurs et plateforme
    • Documentation API
    • MCP
    • Tarifs
    • Playground de modèles
    • LLMs.txt
    • Contacter le support
    • Annuaire des guides de modèles
    Entité exploitante :
    鯨樞智能科技有限公司
    JINGSHU INTELLIGENT LIMITED
    Siège social :
    ROOM 5042, 5/F, YAU LEE CENTRE, NO.45, HOI YUEN ROAD, KWUN TONG, KOWLOON, HONG KONG
    ConfidentialitéConditionsUsage acceptableSuppression des donnéesConservation des donnéesSous-traitants et régionsFacturation et remboursementsPolitique relative aux cookiesPlan du siteÀ propos

    © 2026 ToAPIs. Tous droits réservés.