메인 콘텐츠로 건너뛰기

Documentation Index

Fetch the complete documentation index at: https://docs.apigo.ai/llms.txt

Use this file to discover all available pages before exploring further.

권장 엔드포인트

최소한의 요청

{
  "model": "veo-3.1-generate-preview",
  "prompt": "An 8-second ApiGo product demo animation"
}

cURL 예

curl "https://generativelanguage.googleapis.com/v1beta/models/veo-3.1-generate-preview:predictLongRunning" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "An 8-second ApiGo product demo animation"
  }'

파이썬 예제

import requests

create_response = requests.post(
    "https://generativelanguage.googleapis.com/v1beta/models/veo-3.1-generate-preview:predictLongRunning",
    headers={
        "x-goog-api-key": "<GEMINI_API_KEY>",
        "Content-Type": "application/json",
    },
    json={"prompt": "An 8-second ApiGo product demo animation"},
)

operation = create_response.json()
print(operation)

Node.js 예

const createResponse = await fetch(
  "https://generativelanguage.googleapis.com/v1beta/models/veo-3.1-generate-preview:predictLongRunning",
  {
    method: "POST",
    headers: {
      "x-goog-api-key": process.env.GEMINI_API_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      prompt: "An 8-second ApiGo product demo animation"
    }),
  }
);

const operation = await createResponse.json();
console.log(operation);

모범 사례

  • 초기 요청은 최종 비디오가 아닌 작업 핸들을 반환합니다.
  • 폴링 및 상태 매핑은 서버에 있어야 합니다.
  • 작업이 완료된 후에만 최종 자산을 검색합니다.