모델 및 계정
API를 완성하는 두 개의 읽기 엔드포인트가 있습니다: 공개 모델 목록과 인증된 계정 스냅샷입니다. 크레딧을 사용하기 전에 이들을 활용하세요.
GET /v1/models
공개되어 있으며 키가 필요 없습니다. 모든 티어의 한도와 API가 청구하는 정확한 크레딧 매트릭스를 반환합니다.
응답
{
"video": [
{
"id": "lite",
"resolutions": ["480p", "720p"],
"min_duration": 5,
"max_duration": 10,
"supports_audio": false,
"prices": { "480p": { "5": 3 }, "720p": { "5": 3 } }
}
],
"image": [
{
"id": "lite",
"resolutions": ["2k"],
"aspect_ratios": ["1:1", "4:3", "16:9", "9:16", "adaptive"],
"max_reference_images": 3,
"credits": 1
}
],
"max_prompt_length": 8000
}| Field | 값 |
|---|---|
| video | 동영상 티어당 하나의 객체: id, resolutions, min_duration, max_duration, supports_audio, 그리고 prices (resolution → duration → credits) |
| image | 이미지 티어당 하나의 객체: id, resolutions, aspect_ratios, max_reference_images, credits |
| max_prompt_length | prompt의 문자 제한(8,000) |
video
- 값
- 동영상 티어당 하나의 객체:
id,resolutions,min_duration,max_duration,supports_audio, 그리고prices(resolution → duration → credits)
image
- 값
- 이미지 티어당 하나의 객체:
id,resolutions,aspect_ratios,max_reference_images,credits
max_prompt_length
- 값
prompt의 문자 제한(8,000)
GET /v1/account
인증되었습니다. 크레딧 잔액, 플랜 플래그 및 사용한 키의 ID를 반환합니다.
응답
{
"credits": 120,
"is_paid": true,
"is_premium": false,
"key": { "id": 12, "name": "my-script", "prefix": "du_live_ab12" }
}| Field | 값 |
|---|---|
| credits | 사용 가능한 생성 크레딧 |
| is_paid | 계정이 크레딧을 구매했는지 여부 |
| is_premium | 계정이 pro에서 오디오를 요청할 수 있는지 여부 |
| key | 이 요청을 만든 키: id, name 및 prefix, 절대 비밀은 아님 |
credits
- 값
- 사용 가능한 생성 크레딧
is_paid
- 값
- 계정이 크레딧을 구매했는지 여부
is_premium
- 값
- 계정이
pro에서 오디오를 요청할 수 있는지 여부
key
- 값
- 이 요청을 만든 키:
id,name및prefix, 절대 비밀은 아님
배치 전에 credits를 확인하고, 비용을 하드코딩하지 말고 prices를 읽으세요. 402는 잔액이 부족하다는 뜻이며, 아무것도 청구되지 않았습니다.