Agnes 모델 API 호출 가이드
서드파티 도구 불필요——HTTP로 직접 Agnes 비디오 모델 호출, 완전한 Python 코드 예제 포함
사전 요구사항
API를 호출하기 전에 필요한 것:
- 유효한 Agnes API Key (Agnes Cloud Platform에서 획득)
- 기본적인 HTTP 요청 지식 (Python 예제 제공, 모든 언어에서 작동)
API 엔드포인트
POST
https://api.agnes-ai.com/v1/video/generate
인증 방식
모든 API 요청은 헤더에 Bearer Token 인증을 포함해야 합니다:
// Authorization header
Authorization: Bearer YOUR_API_KEY
요청 본문
POST 요청을 보내고 JSON 본문에 다음 매개변수를 포함합니다:
{
"prompt": "A cat walking through a neon-lit Tokyo alley",
"duration": 5,
"resolution": "1080p",
"style": "cinematic",
"narration": true,
"narration_lang": "en",
"subtitles": true
}매개변수 참조
| 매개변수 | 유형 | 필수 | 설명 |
|---|---|---|---|
| prompt | string | 예 | 비디오 설명 텍스트 (영어 또는 중국어), 권장 20-200자 |
| duration | number | 아니오 | 비디오 길이(초), 기본값 5, 범위 3-30 |
| resolution | string | 아니오 | 해상도: 720p / 1080p, 기본값 1080p |
| style | string | 아니오 | 비디오 스타일: cinematic / anime / realistic / abstract |
| narration | boolean | 아니오 | AI 내레이션 생성 여부, 기본값 false |
| narration_lang | string | 아니오 | 내레이션 언어: zh / en / ja / ko 등, narration=true 필요 |
| subtitles | boolean | 아니오 | 자막 생성 여부, 기본값 false |
완전한 Python 예제
작업 제출, 상태 폴링, 비디오 가져오기의 완전한 Python 예제:
import requests
API_KEY = "your_api_key_here"
url = "https://api.agnes-ai.com/v1/video/generate"
headers = {"Authorization": f"Bearer {API_KEY}"}
payload = {
"prompt": "A drone shot of a mountain lake at sunrise",
"duration": 8,
"resolution": "1080p",
}
resp = requests.post(url, json=payload, headers=headers)
task = resp.json()
print(f"Task ID: {task['task_id']}")
# Poll for result
status = requests.get(
f"https://api.agnes-ai.com/v1/video/status/{task['task_id']}",
headers=headers
)
print(status.json()['video_url'] if status.json().get('video_url')
else "Still generating...")코드를 작성하고 싶지 않으신가요?
위의 모든 API 호출——인증, 매개변수 구성, 상태 폴링, 오류 재시도——는 Agnes Video Generator가 이미 처리합니다. 브라우저를 열고 아이디어를 입력한 후 원클릭으로 비디오를 생성하세요. Agnes 비디오 모델을 사용하는 가장 간단한 방법입니다.
Agnes Video Generator 온라인 체험 →관련 페이지
Agnes AI Video Model Overview — Capabilities, Versions & Access | Free AI Video Guide
A complete overview of the Agnes AI video model: core capabilities, version differences, and access methods. From text-to-video to image-to-video, master the full picture.
Agnes Model Prompt Engineering — 5 Tips for Better Video Prompts | Free AI Video Guide
Master prompt engineering for the Agnes video model. From camera language to temporal description — 5 core principles with good/bad examples. Make AI understand your vision precisely.