SeedanceLink
RecarregarEntrar
← Todos os artigos

Este artigo está disponível em inglês. Também há artigos em chinês no menu de idiomas.

Getting started

Your first Seedance video: Google sign-in, API key, and three requests

Connect your account to your first video task, then check and download it with the same API key.

Neste artigo

SeedanceLink has two forms of access with different jobs. Google sign-in opens your web console, where you manage your account, balance, and API keys. A video request uses an API key in its Authorization header. A successful browser login does not make a command-line request authenticated, and you do not need to copy an OAuth authorization code into your API client.

This walkthrough follows one small text-to-video task from creation to download. It uses Seedance 2.0, an explicit four-second duration, and 480p resolution. Work through the commands in the same terminal session so the API_BASE, API_KEY, and TASK_ID variables remain available. Replace the key placeholder with a key from your own account.

Prepare your account and key

Choose Google sign-in on the customer site, then open the console. Add sufficient balance for the task when recharge is available. The recharge page displays the payment methods currently enabled for your account; signing in alone does not give a funded API balance. If payment is unavailable, do not assume a disabled payment button represents a completed recharge.

Open API keys and create a key in the Seedance-enabled group. Store it privately rather than in a browser URL, public repository, shared screenshot, or client-side application bundle. For your first test, give the key a recognizable name. Use this same key when checking or downloading the task: ownership is tied to the key that created it.

Submit one explicit request

The smallest example below has a standard retail estimate of USD $0.36 before any applicable group multiplier. Specifying both duration and resolution makes the example predictable: omitted values default to five seconds and 720p, which is a different quote. The model ID is an API identifier, so copy it exactly from the model page rather than replacing it with a display name.

cURL · create
API_KEY='YOUR_API_KEY'
API_BASE='https://seedancelink.io'

curl --fail-with-body --request POST "$API_BASE/api/v3/contents/generations/tasks" \
  --header "Authorization: Bearer $API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "seedance-2.0-933",
  "content": [
    {
      "type": "text",
      "text": "A paper boat on a calm lake at sunrise."
    }
  ],
  "duration": 4,
  "resolution": "480p",
  "ratio": "16:9"
}'

The response is a task receipt, not an MP4. Save its id and keep the original request with it. The receipt also includes the task state and billing information. Treat a task with an ID as the existing unit of work even if generation is still queued. Sending the same creation request again would create another task; it is not a status check.

Check, then download

Set TASK_ID to the id in your creation response and query the status approximately every 15 seconds. queued means the task is waiting; running means generation is in progress. Only succeeded is ready for the download step. Keep API_KEY and API_BASE from the creation command, and avoid a fast loop that continuously polls the server.

cURL · status
TASK_ID='REPLACE_WITH_RESPONSE_ID'

curl --fail-with-body "$API_BASE/api/v3/contents/generations/tasks/$TASK_ID" \
  --header "Authorization: Bearer $API_KEY"

After succeeded, call the owned content endpoint using the same API key. The download command follows HTTPS redirects and saves the result as video.mp4. Do not add --location-trusted: a redirect is not a reason to send your private key to another host. A task that has already been paid for can still be read or downloaded with its active owner key when the remaining balance is zero.

cURL · download
curl --fail --location --proto-redir '=https' --max-redirs 3 \
  "$API_BASE/api/v3/contents/generations/tasks/$TASK_ID/content" \
  --header "Authorization: Bearer $API_KEY" \
  --output video.mp4

Questions before your first request

Can I use the Google access token as my API key?

No. Use an API key created in your SeedanceLink console. Google sign-in is for access to the web account.

What if the creation receipt says needs_reconcile?

Save its task ID and query that task. The reservation remains held while the submission is reviewed; do not automatically send another creation request.

Does the requested four-second example always finish immediately?

No. Generation is asynchronous. Use the returned task state rather than a fixed delay or a promised completion time.

Ler a documentação