Preços+7% bônus
Schuyler Stacy2026-07-09

Como gerar vídeo com uma API de IA: Seedance 2.0, ViduQ3 e mais 3 modelos com uma única chave

Passo a passo: gere vídeo com uma API de IA em cerca de 10 linhas de Python. Uma chave dá acesso a Seedance 2.0, ViduQ3, Kling, Hailuo e Veo — código executável e preços reais.

Como gerar vídeo com uma API de IA: Seedance 2.0, ViduQ3 e mais 3 modelos com uma única chave

Resumo: Para gerar vídeo com uma API de IA, você envia um prompt de texto por POST ao endpoint de um modelo de vídeo, recebe um ID de tarefa e consulta essa tarefa até que o MP4 finalizado esteja pronto — aproximadamente dez linhas de Python. A API unificada da GPTProto oferece cinco modelos de vídeo com uma única chave e um único saldo: Seedance 2.0, ViduQ3-pro, Kling v3.0 std, Hailuo 2.3 Pro e Veo 3.1. Você alterna entre eles alterando uma única string na URL — a autenticação, o formato da solicitação e a consulta permanecem idênticos. A cobrança é pré-paga conforme o uso, começando em cerca de US$ 0,04 por segundo de vídeo.

 

Usar cinco modelos de vídeo diferentes costumava significar cinco contas, cinco SDKs e cinco painéis de cobrança. Quer o Seedance 2.0 da ByteDance? Isso exige uma conta BytePlus (Volcano Engine) e uma verificação de identidade que a maioria das pessoas fora da China não consegue concluir em uma tarde. Quer o Veo do Google? Outro console, outra chave. Quer fazer um teste A/B com dois modelos usando o mesmo prompt? Agora você precisa manter duas integrações que não compartilham nada.

Este guia elimina tudo isso. Você fará sua primeira chamada de API de texto para vídeo em cerca de dez linhas de Python, consultará o MP4 finalizado e, em seguida, acessará mais quatro modelos alterando uma única string na URL — mesma chave, mesmo código, mesmo saldo.

Transparência total: escrevo estes guias de integração para a GPTProto, portanto tenho interesse em qual endpoint você usa. Ainda assim, mantive os números honestos, inclusive o modelo abaixo em que usar nosso serviço custa mais do que usar o serviço diretamente. Quando esse for o caso, eu direi.

Índice

What an AI video generation API actually is

It's not a no-code button. It's an asynchronous job: you POST a prompt, the API hands back an ID, the model renders for anywhere from thirty seconds to several minutes, and you poll a second endpoint until the video is ready. That render delay is the whole reason for the two-step design — video takes too long to hold an HTTP connection open, so you get a job ticket instead of a file.

Three request shapes cover almost everything you'll build:

  • text-to-video — a prompt becomes a clip.
  • image-to-video — a still frame is animated forward.
  • reference-to-video — one or more reference images keep a character or object consistent across shots.
    Everything below uses the same base URL, https://gptproto.com/api/v3, and the same header. Let's get a key and make the first call.

Get your API key

Sign up at gptproto.com, open the API Keys section of the dashboard, and create a key. It looks like sk-.... There's no standing free tier here — billing is prepaid pay-as-you-go, so you top up a balance and every call draws from it starting with the first request. Budget a couple of dollars for testing; a handful of short clips won't cost more than that.

Install the one dependency:

pip install requests

One thing to get right before your first call, because it trips people up: on the native /api/v3/ surface, the Authorization header is your raw key with no Bearer prefix. GPT Proto also exposes an OpenAI-compatible /v1/ surface, and that one uses Bearer. Mixing them up is the most common 401 I see. For this whole tutorial we stay on the native surface, so the key goes in raw.

Your first call: Seedance 2.0, text-to-video

Seedance 2.0 is ByteDance's second-generation video model. It renders 4-to-15-second clips up to 1080p with native, synchronized audio, and it's built for multi-shot scenes where the camera cuts and the subject stays consistent. Here's a complete text-to-video submission:

import requests
import time
 
API_KEY = "sk-your-key-here"   # raw, no "Bearer" prefix
BASE = "https://gptproto.com/api/v3"
 
headers = {
    "Authorization": API_KEY,
    "Content-Type": "application/json",
}
 
def submit_seedance(prompt):
    url = f"{BASE}/bytedance/dreamina-seedance-2-0-260128/text-to-video"
    payload = {
        "prompt": prompt,
        "duration": 5,           # 4-15 seconds
        "aspect_ratio": "16:9",
        "resolution": "1080p",
        "generate_audio": True,
        "camera_fixed": False,
        "seed": -1,              # -1 = random
    }
    resp = requests.post(url, headers=headers, json=payload)
    resp.raise_for_status()
    return resp.json()["data"]["id"]
 
prompt = (
    "A lighthouse keeper climbs a narrow spiral staircase at dawn. "
    "Cut to a wide shot of the lamp room as the light sweeps across "
    "grey water. Waves crash below. Ambient wind and distant gulls."
)
job_id = submit_seedance(prompt)
print("submitted:", job_id)

The same request as cURL, if you'd rather see the wire format:

curl -X POST "https://gptproto.com/api/v3/bytedance/dreamina-seedance-2-0-260128/text-to-video" \
  -H "Authorization: sk-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A lighthouse keeper climbs a spiral staircase at dawn, then the lamp sweeps across grey water.",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "1080p",
    "generate_audio": true,
    "camera_fixed": false,
    "seed": -1
  }'

The response doesn't contain a video. It contains a job:

{
  "data": {
    "id": "cgt-20260709xxxxxx-abc",
    "status": "created",
    "outputs": [],
    "urls": { "get": "https://gptproto.com/api/v3/predictions/cgt-20260709xxxxxx-abc/result" }
  },
  "message": "success",
  "code": 200
}

data.id is your ticket. data.urls.get is a ready-made poll URL with the ID already baked in. In a nutshell: you submitted work, you got an ID, and nothing is rendered yet.

Poll for the result

Now you hit the result endpoint until status flips to completed, then read the video URL out of outputs. Every model on the platform uses this same poll endpoint and the same response shape, which is what makes the "swap one string" trick later work:

def wait_for_video(job_id, every=5, timeout=600):
    url = f"{BASE}/predictions/{job_id}/result"
    waited = 0
    while waited < timeout:
        resp = requests.get(url, headers=headers)
        resp.raise_for_status()
        data = resp.json()["data"]
        status = data["status"]
 
        if status == "completed":
            return data["outputs"][0]        # the MP4 URL
        if data.get("error"):
            raise RuntimeError(data["error"])
 
        print(f"  {status}... {waited}s")
        time.sleep(every)
        waited += every
 
    raise TimeoutError(f"timed out after {timeout}s (last status: {status})")
 
video_url = wait_for_video(job_id)
print("done:", video_url)

That's a full working generation. Two functions, one prompt, one MP4. A 5-second clip usually finishes in a minute or two, though a 15-second 1080p render with audio can take longer — poll every few seconds and don't hammer it.

A note on the loop: I raise on error and treat any non-completed, non-error status as "keep waiting." That's deliberate. Different models report intermediate states differently, and the safe move is to wait through anything that isn't a hard failure rather than hard-code a list of statuses that might change.

Swap one string, swap the engine: ViduQ3-pro

Here's the payoff. To render the same prompt on ViduQ3-pro instead of Seedance, you change the path — nothing else. The key, the headers, and wait_for_video() all stay exactly as they are:

def submit_vidu(prompt):
    url = f"{BASE}/vidu/viduq3-pro/text-to-video"
    payload = {
        "prompt": prompt,
        "duration": 5,           # ViduQ3 goes up to 16s
        "aspect_ratio": "16:9",
        "resolution": "1080p",
        "audio": True,           # note: ViduQ3 uses `audio`, not `generate_audio`
        "seed": -1,
    }
    resp = requests.post(url, headers=headers, json=payload)
    resp.raise_for_status()
    return resp.json()["data"]["id"]
 
job_id = submit_vidu(prompt)
video_url = wait_for_video(job_id)   # same poller, unchanged

ViduQ3-pro pushes clips to 16 seconds — twice Seedance's practical range — and it's the cheapest of the models here per second. The parameter names shift a little from model to model (ViduQ3 controls sound with audio; Seedance uses generate_audio), so check the model page for the exact field set, but the request/submit/poll rhythm never changes.

Keeping a character consistent. Both hero models do more than text-to-video. Point ViduQ3 at /vidu/viduq3-pro/image-to-video with an image field to animate a still, or use Seedance's reference-to-video mode with reference images so the same face carries across separate shots. It's the same submit-and-poll flow — you're adding an image input, not learning a new API. Confirm the reference-field names on each model page before you wire it into production.

Which one should you call?

Five models, one key. They aren't ranked tiers where a bigger number always wins — they're different jobs. Pick by what the clip needs:

Model Path ({provider}/{model}) Native audio Max length Price Reach for it when
Seedance 2.0 bytedance/dreamina-seedance-2-0-260128 Yes ~15s from $0.2957/run Multi-shot scenes with synced sound
ViduQ3-pro vidu/viduq3-pro Yes 16s from $0.04/s Longer clips, tightest price
Kling v3.0 std kling/kling-v3.0-std Yes ~10s from $0.2016/run Cheap, dependable image-to-video
Hailuo 2.3 Pro minimax/hailuo-2.3-pro No ~10s $0.441/run Clean 1080p when you'll add sound yourself
Veo 3.1 google/veo3.1 Yes — from $0.5/run You need 4K output

Two things worth flagging before you commit. Hailuo 2.3 Pro returns silent video — great picture, but you're scoring it in post. And Veo 3.1 stamps every output with an embedded SynthID watermark you can't turn off, which matters if you're delivering to a client who doesn't want provenance marks baked in.

Because the platform normalizes all of these behind one submit/poll contract, iterating across them is a dictionary lookup, not a rewrite:

MODELS = {
    "seedance": "bytedance/dreamina-seedance-2-0-260128",
    "vidu":     "vidu/viduq3-pro",
    "kling":    "kling/kling-v3.0-std",
    "hailuo":   "minimax/hailuo-2.3-pro",
    "veo":      "google/veo3.1",
}
 
def submit(model_key, scene, payload):
    url = f"{BASE}/{MODELS[model_key]}/{scene}"
    resp = requests.post(url, headers=headers, json=payload)
    resp.raise_for_status()
    return resp.json()["data"]["id"]
 
# same wait_for_video() retrieves any of them
job_id = submit("kling", "image-to-video", {"prompt": prompt, "image": image_url})

Payloads differ per model — that's the part you tune — but discovery, auth, and retrieval don't.

What it actually costs

Video pricing is per second or per run, and it scales hard with resolution, duration, and whether you generate audio. The headline number on a model page is a floor, not a forecast. As a real example, a Seedance 720p / 16:9 / 5-second clip with audio comes out around $0.605 — well above its $0.2957 baseline — because you moved every cost lever at once. Price your actual settings from the dashboard estimate, not the sticker.

Here's the honest comparison against calling each vendor directly:

  • ViduQ3-pro — from $0.04/s, roughly 20% under the ~$0.05/s market reference.
  • Kling v3.0 std — from $0.2016/run, about 20% under the ~$0.252 reference.
  • Hailuo 2.3 Pro — $0.441/run against MiniMax's ~$0.49, about 10% cheaper.
  • Seedance 2.0 — from $0.2957/run, which is about 10% above rendering the same clip directly on ByteDance's own Dreamina. I'm not going to pretend otherwise. The reason to call it through the API isn't a lower price — it's stable programmatic access, one balance, and no BytePlus identity check. If cost is the only thing you care about for Seedance specifically, going direct is cheaper.
  • Veo 3.1 — from $0.5/run; there's no clean market reference on the page, so treat it as a convenience play, not a discount.
    There's no free tier and no monthly subscription — you pay per call from the first request. For pricing on any specific model, the model catalog shows the current per-second and per-resolution tables.

Errors and gotchas

A short field guide to what breaks:

  • 401 Unauthorized — almost always the Bearer mix-up. The native /api/v3/ surface wants the raw key.
  • 403 Forbidden — usually an empty balance, not a permissions problem. Top up.
  • 429 — you're rate-limited; back off and retry.
  • 400 with a content message — the prompt tripped moderation. Responses also carry a has_nsfw_contents flag worth checking in a pipeline.
  • Poll never completes — long renders exist; that's why wait_for_video() has a timeout instead of looping forever.
  • Wrong audio parameter — generate_audio (Seedance) vs audio (ViduQ3). Sending the wrong one silently does nothing rather than erroring, which is worse. Check the field names per model.

 

Start here

The fastest path: grab a key, run the Seedance and ViduQ3 snippets above, then swap the model string to try the rest. Everything you need to pick a model — current pricing, supported modes, resolution tables — is on each model page in the catalog. One key, one balance, five video engines.

Creative Studio

Gere imagem, vídeo e mais com APIs de produção.

Começar a criar
Creative Studio
Modelos relacionados
Todos os modelos
OpenAI
20% OFF
Claude
10% OFF
OpenAI
20% OFF
OpenAI
20% OFF

Perguntas frequentes

Preciso de uma conta separada para cada modelo?

Não. Uma única chave GPTProto dá acesso a todos esses modelos usando um único saldo. Você altera o caminho da URL, não as credenciais.

Quanto custa uma API de geração de vídeo com IA?

Começa em cerca de US$ 0,04 por segundo (ViduQ3-pro) e varia conforme resolução, duração e áudio. Um clipe de 5 segundos em 1080p com som normalmente custa entre US$ 0,20 e US$ 0,60, dependendo do modelo.

Qual é a melhor API de geração de vídeo com IA em 2026?

Depende da tarefa. Seedance 2.0 para cenas com vários planos e áudio sincronizado; ViduQ3-pro para duração e preço; Kling v3.0 std para imagem para vídeo econômica; Hailuo 2.3 Pro quando você adicionará sua própria trilha sonora; Veo 3.1 quando precisar de 4K. A tabela acima relaciona cada modelo ao seu caso de uso.

Existe um plano gratuito?

Não. A cobrança é pré-paga conforme o uso desde a primeira chamada.

Essas APIs podem gerar áudio nativo?

A maioria oferece — Seedance 2.0, ViduQ3-pro, Kling v3.0 std e Veo 3.1 retornam som sincronizado. O Hailuo 2.3 Pro retorna vídeo sem áudio, então planeje adicionar o som na pós-produção.

Artigos relacionados

Mais blogs
7 geradores de vídeo com IA mais acessíveis em 2026 (classificados pelo custo real por vídeo)

7 geradores de vídeo com IA mais acessíveis em 2026 (classificados pelo custo real por vídeo)

Uma assinatura de vídeo de US$ 30/mês pode custar mais do que uma chamada de API de US$ 0,04. Parece o contrário, então vou mostrar os cálculos logo de início: se esse plano oferece 800 créditos e um clipe razoável consome 200, você obtém quatro vídeos por US$ 30 — cerca de US$ 7,50 cada. No GPTProto, uma geração de 16 segundos com o Vidu Q3 Pro e áudio nativo custa $0.04 . Você teria que gerar 187 vídeos desses para gastar os mesmos US$ 7,50. Essa diferença é toda a história por trás do "vídeo com IA acessível" em 2026. O preço exibido na página inicial não diz quase nada. O que importa é o custo de um vídeo utilizável — aquele que você mantém depois das tentativas. Este artigo classifica a forma mais barata de realmente obter esse vídeo, usando preços atuais por geração, e é honesto sobre quando o barato deixa de valer a pena.

Tiffany Layne | 2026-07-07

Seedance 2.0 Mini vs Seedance 2.0: preço, qualidade e qual usar de verdade

Seedance 2.0 Mini vs Seedance 2.0: preço, qualidade e qual usar de verdade

Resumo — Na mesma resolução, o Seedance 2.0 Mini custa cerca de 20% menos que o Seedance 2.0 padrão no GPTProto — não o “metade do preço” que você vai ler na maioria das páginas de comparação. A maior economia vem de um limite rígido: o Mini para em 720p, então ele pula completamente os níveis caros de 1080p e 4K. Use o Mini quando quiser iteração rápida e em alto volume e clipes curtos para redes sociais. Use o Seedance 2.0 padrão quando precisar de 1080p ou 4K, cenas com mais movimento ou um corte final para apresentar ao cliente. A configuração que realmente compensa é usar os dois: rascunho no Mini, finalização no padrão. O restante deste guia sobre o Seedance 2.0 Mini e seu irmão em tamanho completo mostra os números reais por trás de cada uma dessas escolhas.

Tiffany Layne | 2026-06-30

O Seedance 2.5 já foi lançado? Data de lançamento e o que realmente sabemos (2026)

O Seedance 2.5 já foi lançado? Data de lançamento e o que realmente sabemos (2026)

Atualizei a página do Seed da ByteDance mais vezes do que gostaria de admitir nesta semana, esperando o Seedance 2.5 aparecer. Até agora, nada. Nenhuma página do modelo, nenhuma ficha técnica, nenhuma data. Essa lacuna é exatamente o motivo deste post existir: há muita coisa escrita com confiança sobre o Seedance 2.5 circulando neste momento, e a maior parte apresenta suposições como fatos. Quero separar claramente as duas coisas e, em seguida, indicar o que você pode realmente executar hoje.

Tiffany Layne | 2026-06-23

Como usar o Kling 3.0 Motion Control: um guia para desenvolvedores (Web + API)

Como usar o Kling 3.0 Motion Control: um guia para desenvolvedores (Web + API)

Kling 3.0 Motion Control animates a static character image with the movement from a reference video. You give it two inputs — a picture of your character and a video of someone moving — and it returns a new clip where your character performs that exact choreography while keeping their own face, outfit, and look. This is motion transfer, not text-to-motion. Instead of describing an action in a prompt and hoping the model interprets it, you show it the action frame by frame. That makes it far more reliable for repeatable character animation, dance, and gesture work. This guide covers both paths: the Kling web app for one-off clips, and the GPTProto API for wiring Motion Control into a pipeline. We'll cover inputs and limits, the `pro` vs `std` tiers, prompt technique, full runnable code, pricing, and the failure modes worth knowing before you spend credits.

Michael Johnson | 2026-06-30