생성 템플릿

이미지 및 비디오 생성을 위한 원필드 프리셋. 템플릿 슬러그를 건네서 제품, 편집, 바이럴, 시네마틱, 모션 또는 변형 레시피를 적용하세요.

템플릿은 /v1/images/generations/v1/videos/generations를 위한 사전 선별된 ‘창의적 효과’ 레시피입니다. 각 템플릿은 추천 모델, 지원 모델 목록, 기본 매개변수 및 필수 입력 규칙을 제공합니다. 요청 본template: "<slug>" 전달하면, EmpirioLabs가 제공하는 다른 효과와 함께 적용하고, 가장 적합한 모델을 선택한 후 통화를 작업자에게 전달합니다.

같은 템플릿 카탈로그가 플레이그라운드의 Templates 버튼을 작동시킵니다.

목록 템플릿

GET
/v1/templates
1curl https://api.empiriolabs.ai/v1/templates \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json"

전체 이미지 및 비디오 카탈로그에는 일반 엔드포인트를 사용하거나, 생성 유형을 이미 알고 있다면 모달리티별 엔드포인트를 사용하세요.

$curl https://api.empiriolabs.ai/v1/templates?modality=image \
> -H "Authorization: Bearer $EMPIRIOLABS_API_KEY"

비디오 템플릿 목록

GET
/v1/videos/templates
1curl https://api.empiriolabs.ai/v1/videos/templates \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json"

필터

  • category: viral, cinematic, motion, transform, social, extend, product, edit, portrait
  • modality: video 아니면 image
  • model: 특정 모델 슬러그를 지원하는 템플릿만 반환
  • featured: true 추천 템플릿으로만 필터링
$curl https://api.empiriolabs.ai/v1/videos/templates?category=viral \
> -H "Authorization: Bearer $EMPIRIOLABS_API_KEY"

응답 형태

1{
2 "object": "list",
3 "template_count": 11,
4 "data": [
5 {
6 "slug": "baseball-stadium",
7 "display_name": "Stadium",
8 "category": "viral",
9 "description": "Customer-facing description shown in the playground card.",
10 "recommended_model": "kling-o3",
11 "supported_models": ["kling-o3"],
12 "default_params": { "aspect_ratio": "16:9", "duration": 10 },
13 "required_inputs": { "image": true, "min_images": 1, "max_images": 1 },
14 "cover_image_url": "https://media.empiriolabs.ai/assets/template-posters/baseball-stadium.jpg",
15 "preview_video_url": "https://media.empiriolabs.ai/assets/template-previews/baseball-stadium.mp4",
16 "modality": "video",
17 "is_featured": true,
18 "display_order": 10
19 }
20 ]
21}

목록 이미지 템플릿

GET
/v1/images/templates
1curl https://api.empiriolabs.ai/v1/images/templates \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json"
$curl https://api.empiriolabs.ai/v1/images/templates?model=seedream-5-0-lite \
> -H "Authorization: Bearer $EMPIRIOLABS_API_KEY"

단일 템플릿을 가져오세요

GET
/v1/templates/:slug
1curl https://api.empiriolabs.ai/v1/templates/studio-product-shot \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json"
$curl https://api.empiriolabs.ai/v1/templates/studio-product-shot \
> -H "Authorization: Bearer $EMPIRIOLABS_API_KEY"

슬러그가 없으면 404 code: "template_not_found" 반환합니다.

템플릿으로 영상을 생성하세요

일반 /v1/videos/generations 전화에 template: "<slug>" 추가하세요. 템플릿이 요구하는 것(required_inputs)을 제공해야 하며, 보통 참고 이미지가 필요합니다.

$curl https://api.empiriolabs.ai/v1/videos/generations \
> -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "template": "baseball-stadium",
> "image_url": "https://example.com/me.jpg"
> }'

행동:

  • 모델 선택: model 통과하지 못하면 템플릿의 recommended_model이 사용됩니다. 만약 그렇게 하면, 대부분의 템플릿은 supported_models 상태임을 확인하고 400template_model_unsupported 반환합니다. metadata.force_recommended_model: true가 있는 템플릿은 효과 충실도를 위해 recommended_model에 고정됩니다.
  • 모달리티 체크: 이미지 템플릿은 /v1/images/generations에만 적용됩니다; 비디오 템플릿은 /v1/videos/generations에만 적용됩니다.
  • 프롬프트 블렌드: prompt(있다면)는 템플릿 내장 스타일링과 결합되어 생성된 결과물이 요청과 효과의 미적 감각에 모두 맞도록 합니다. 짧은 방향성 안내를 보내세요; 나머지는 EmpirioLabs가 담당합니다.
  • 기본 파라미터: 템플릿에서 명시적으로 설정하지 않은 키에만 병합default_params.
  • 필수 입력: \{ "image": true \} image_url / image / images가 제공되지 않으면 통화가 400 template_missing_image을 반환한다는 의미입니다.

템플릿으로 이미지를 생성하세요

$curl https://api.empiriolabs.ai/v1/images/generations \
> -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "template": "background-swap",
> "prompt": "Place this product on a brushed steel studio plinth",
> "image": ["https://example.com/product.jpg"]
> }'

응답은 일반 비디오 생성과 동일한 비동기 작업 엔벨로프입니다:

1{
2 "job_id": "abc123...",
3 "status": "processing",
4 "poll_url": "/v1/jobs/abc123..."
5}

종말까지 GET /v1/jobs/\{job_id\} 설문을 진행하세요.

이전 영상을 연장하세요

/v1/videos/generations 이전 세대를 이어가기 위해 extend_from도 받아들입니다. EmpirioLabs가 사전 클립 배선을 처리하고, 본인이 직접 제공하지 않는 한 합리적인 연속성 프롬프트를 사용합니다.

$curl https://api.empiriolabs.ai/v1/videos/generations \
> -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "extend_from": { "job_id": "<prior_job_id>" }
> }'

직접 URL을 전달할 수도 있습니다:

1{ "extend_from": { "video_url": "https://media.empiriolabs.ai/..." } }

Extend는 템플릿으로 글을 쓸 수 있습니다:

1{
2 "template": "action-hero",
3 "extend_from": { "job_id": "<prior>" }
4}

Extend는 모든 비디오 모델에서 작동합니다

지원되는 어떤 비디오 모델이든 extend_from 통과하세요. model 빠뜨리면, EmpirioLabs는 확장에 대해 합리적인 기본값을 선택합니다.

오류 코드

HTTP코드의미
400template_not_found슬러그는 어떤 활성 템플릿과도 일치하지 않습니다
400template_model_unsupported합격한 모델은 템플릿 supported_models에 포함되어 있지 않습니다
400template_modality_mismatch템플릿 모달리티가 생성 종료점과 일치하지 않습니다
400template_missing_image템플릿에는 이미지가 필요하지만 본문에는 이미지가 포함되어 있지 않았습니다
400template_missing_video템플릿에는 참고 영상이 필요하지만 본문에는 포함되지 않았습니다
400template_no_model템플릿에는 recommended_model이 없고, 통과하지도 않았어요
400extend_extraction_failed이전 영상을 Extend에서 처리할 수 없었어요. 다른 모델을 시도해 보세요.
400extend_invalid_shapeextend_from 기형이었어
400extend_no_prior_video이전 직장에는 해결 가능한 영상 URL이 없었어요
404extend_prior_not_foundextend_fromjob_id은 알려지지 않았다
500extend_frame_upload_failed이전 영상을 Extend에 준비하지 못했어요. 다시 시도하거나 다른 모델을 시도해 보세요.