CheaperGen

시작하기

빠른 시작

API 키를 만들고 크레딧을 충전한 뒤 JavaScript, Python 또는 cURL로 2분 안에 첫 AI 동영상을 생성하세요.

이 가이드는 Seedance 2.0 Fast으로 첫 동영상을 완성하는 과정을 안내합니다. 모든 모델에서 같은 절차를 사용하며 엔드포인트와 입력 필드만 달라집니다.

코딩 에이전트를 사용하시나요?

이 내용을 Claude Code, Cursor, Codex 또는 원하는 코딩 에이전트에 붙여넣으세요. 프로젝트에 API를 추가하고 API 키는 CHEAPERGEN_API_KEY에 보관하며, 비용을 사용하기 전에 무료 견적을 요청해 테스트합니다.

Add Seedance 2.0 Fast (CheaperGen endpoint bytedance/seedance-2.0-fast/text-to-video) to this project by following https://cheapergen.com/agents/integrate.md
에이전트가 읽는 내용
  1. 계정 및 API 키 만들기

    Google 계정 또는 이메일 링크로 로그인한 뒤 대시보드 → API 키에서 키를 만드세요. 키는 cg_live_… 형식이며 한 번만 표시되므로 안전한 곳에 복사해 두세요.

  2. 크레딧 충전

    CheaperGen은 선불 충전 방식입니다. 다음에서 크레딧을 충전하세요: 대시보드 → 결제를 다운로드하세요. 아래 예제의 비용은 $0.45 — $0.605 기준: the official price입니다. 생성 실패는 자동 환불됩니다. 자세한 내용: 결제 및 크레딧.

  3. API 키 설정

    키를 코드에 넣지 마세요. 이 문서의 모든 예제는 환경 변수에서 키를 읽습니다:

    export CHEAPERGEN_API_KEY="cg_live_..."
  4. 생성 요청 제출

    모델의 입력값을 POST /api/v1/run/bytedance/seedance-2.0-fast/text-to-video으로 보내세요. 아래 스크립트는 작업을 제출하고 완료될 때까지 폴링한 뒤 동영상 URL을 출력합니다.

    const API = "https://cheapergen.com/api/v1";
    const headers = {
      Authorization: `Bearer ${process.env.CHEAPERGEN_API_KEY}`,
      "Content-Type": "application/json",
    };
    
    // 1. Submit the job
    let job = await fetch(`${API}/run/bytedance/seedance-2.0-fast/text-to-video`, {
      method: "POST",
      headers,
      body: JSON.stringify({
        "prompt": "골든아워에 꽃병을 빚는 도예가에게 천천히 다가가는 카메라, 빛 속 먼지 입자, 얕은 심도",
        "aspect_ratio": "16:9",
        "resolution": "720p",
        "duration": 5
      }),
    }).then((r) => r.json());
    
    // 2. Poll until it finishes (or pass webhook_url and skip polling)
    while (job.status === "queued" || job.status === "running") {
      await new Promise((r) => setTimeout(r, 3000));
      job = await fetch(`${API}/generations/${job.id}`, { headers }).then((r) => r.json());
    }
    
    console.log(job.status === "succeeded" ? job.output.video.url : job.error);

    API는 HTTP 202 Accepted 응답으로 queued 상태의 생성 작업을 즉시 반환합니다. cost.amount_usd에 표시된 요금은 작업 실행 중 잔액에서 보류됩니다.

    202 Accepted
    {
      "id": "gen_8c2QmX1nq0k4Lw7Z",
      "object": "generation",
      "model": "bytedance/seedance-2.0-fast",
      "endpoint": "bytedance/seedance-2.0-fast/text-to-video",
      "mode": "text-to-video",
      "status": "queued",
      "input": {
        "prompt": "골든아워에 꽃병을 빚는 도예가에게 천천히 다가가는 카메라, 빛 속 먼지 입자, 얕은 심도",
        "aspect_ratio": "16:9",
        "resolution": "720p",
        "duration": 5,
        "generate_audio": true
      },
      "output": null,
      "error": null,
      "cost": {
        "amount_usd": 0.4494,
        "currency": "usd",
        "estimated": true
      },
      "source": "api",
      "created_at": "2026-10-15T09:21:04.512Z",
      "started_at": null,
      "completed_at": null,
      "retention": "1d",
      "expires_at": null,
      "purged_at": null,
      "urls": {
        "get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4Lw7Z",
        "cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4Lw7Z/cancel"
      }
    }
  5. 결과 가져오기

    생성의 status 값이 succeeded 또는 failed 중 하나가 될 때까지 폴링하세요. 동영상 작업은 보통 1~3분, 이미지는 몇 초가 걸립니다.

    curl https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4Lw7Z \
      -H "Authorization: Bearer $CHEAPERGEN_API_KEY"
    200 OK
    {
      "id": "gen_8c2QmX1nq0k4Lw7Z",
      "object": "generation",
      "model": "bytedance/seedance-2.0-fast",
      "endpoint": "bytedance/seedance-2.0-fast/text-to-video",
      "mode": "text-to-video",
      "status": "succeeded",
      "input": {
        "prompt": "골든아워에 꽃병을 빚는 도예가에게 천천히 다가가는 카메라, 빛 속 먼지 입자, 얕은 심도",
        "aspect_ratio": "16:9",
        "resolution": "720p",
        "duration": 5,
        "generate_audio": true
      },
      "output": {
        "video": {
          "url": "https://cdn.cheapergen.com/outputs/gen_8c2QmX1nq0k4Lw7Z.mp4",
          "content_type": "video/mp4"
        }
      },
      "error": null,
      "cost": {
        "amount_usd": 0.4494,
        "currency": "usd",
        "estimated": false
      },
      "source": "api",
      "created_at": "2026-10-15T09:21:04.512Z",
      "started_at": "2026-10-15T09:21:09.031Z",
      "completed_at": "2026-10-15T09:22:31.870Z",
      "retention": "1d",
      "expires_at": "2026-10-16T09:22:31.870Z",
      "purged_at": null
    }

    웹훅으로 폴링 생략하기

    요청 본문에 "webhook_url": "https://your-app.com/hooks/cheapergen" 필드를 넣으면 완료된 생성 작업을 해당 URL로 POST합니다. 자세한 내용: 웹훅.

다음 단계#

궁금한 점이나 빠진 내용이 있나요? support@cheapergen.com로 이메일을 보내 주세요. 모든 의견을 읽고 있습니다.