주요 콘텐츠로 건너뛰기

Sprite Pulsar V2

목적​

Pulsar V2 파이프라인으로 36프레임 스프라이트 애니메이션을 생성합니다. 웹 앱의 "Sprite Pulsar V2" 페이지와 동일한 기능입니다. Sprite Zenith와 동일한 입력과 모드를 사용하지만, 길이는 36프레임으로 고정되어 있고 프롬프트 보정 옵션이 없습니다.

mode웹 탭입력
image_to_video단일 이미지이미지 1장
first_last_frame시작/끝 참조 이미지이미지 2장: 시작 프레임과 끝 참조 이미지, 순서대로
video_restyleSprite To Sprite기존 스프라이트 1개 (PNG 스프라이트 시트 + 그리드, 또는 GIF)와 선택적인 레퍼런스 이미지

크레딧 비용: 3 (image_to_video, first_last_frame), 4 (video_restyle)

메서드 및 경로​

POST /public/v1/sprite/pulsar-v2

인증​

인증 페이지를 참고하세요. Bearer 토큰이 필요합니다.

필수 헤더:

Authorization: Bearer {your_api_key}

요청 필드​

요청은 multipart/form-data로 전송합니다. images 필드는 파일마다 한 번씩 반복합니다.

필드명타입필수기본값설명
modestring예허용 값: image_to_video, first_last_frame, video_restyle
imagesfile[]예image_to_video: PNG/JPEG 정확히 1장. first_last_frame: PNG/JPEG 정확히 2장 (시작, 끝). video_restyle: 소스 정확히 1개, PNG 스프라이트 시트 또는 GIF
textstring예, 레퍼런스 이미지가 있는 경우 제외""움직임을 설명하는 프롬프트. 공백은 제거됩니다. video_restyle에서는 reference_image가 주어진 경우에만 비어 있을 수 있습니다
is_pixelboolean아니오false픽셀아트. 첨부한 이미지가 픽셀아트 기반의 이미지라면 켜주세요. video_restyle에서는 무시됩니다 (강제로 false)
reference_imagefile아니오 (video_restyle 전용)레퍼런스 이미지 (선택). PNG만 가능. 소스 스프라이트의 대상이 이 이미지로 교체됩니다
sprite_gridstringPNG 시트를 사용하는 video_restylePNG 시트를 자르는 방식을 설명하는 JSON 객체, 예: {"columns": 6, "rows": 6}. 각 값은 1–32, 최대 120프레임. GIF 소스에서는 허용되지 않습니다
background_colorstring아니오배경 변경 (웹 "배경 변경"). 허용 값: chroma_green, magenta, transparent. chroma_green·magenta: 생성 전에 입력 이미지의 배경을 이 색으로 바꿉니다. transparent: 결과 스프라이트 시트와 GIF의 배경이 투명해집니다. 생략하면 원래 배경을 유지합니다 (웹 "배경 기본"). video_restyle에서는 reference_image에만 적용되므로 reference_image가 필요하고 transparent는 쓸 수 없습니다. 추가 크레딧 없음

Sprite To Sprite(video_restyle) 소스 규칙은 Sprite Zenith와 동일합니다: PNG 시트 + sprite_grid, 또는 최대 120프레임·10초의 GIF. frame 필드는 없으며, 출력은 항상 36프레임입니다.

응답​

성공 응답 (200 OK):

{
"job_id": "uuid-string"
}
필드타입설명
job_idstring생성된 작업의 고유 식별자. 작업 상태 조회로 결과를 조회합니다

오류 / 유효성 검사 규칙​

상황HTTP 상태에러 메시지
파일이 유효한 이미지가 아니거나 허용되지 않는 형식임400"Invalid image file"
모드에 맞지 않는 이미지 개수400"image_to_video requires exactly one image" / "first_last_frame requires exactly two images (start, end)" / "video_restyle requires exactly one source image (PNG sprite sheet or GIF)"
text가 비어 있음 (이미지 모드)400"text must not be empty"
text가 비어 있고 레퍼런스 이미지 없음 (video_restyle)400"video_restyle requires text when no reference_image is given"
video_restyle 외에서 reference_image 또는 sprite_grid 전송400"reference_image is only supported for video_restyle" / "sprite_grid is only supported for video_restyle"
sprite_grid 없는 PNG 시트400"sprite_grid is required for a PNG sprite sheet"
sprite_grid가 있는 GIF400"sprite_grid is not allowed for a GIF source"
sprite_grid 형식 오류 또는 범위 초과400sprite_grid must be a JSON object like {"columns": 6, "rows": 6} (1-32 each, at most 120 frames)
GIF가 120프레임을 초과함400"GIF must have at most 120 frames"
GIF가 10초보다 김400"GIF must be at most 10 seconds long"
reference_image 없이 video_restyle에서 background_color 사용400"background_color requires reference_image for video_restyle"
video_restyle에서 background_color transparent 사용400"transparent background is not supported for video_restyle"
유효하지 않은 API 키401"Invalid API key"
필드 누락, 알 수 없는 mode 또는 background_color422Validation error

모든 유효성 검사는 파일이 업로드되기 전에 실행됩니다.

비동기 작업 동작​

이 엔드포인트는 비동기 작업을 생성합니다. 요청 즉시 job_id를 반환하고, 실제 스프라이트 생성은 백그라운드에서 진행됩니다.

폴링 방법:

  1. 응답으로 받은 job_id를 저장합니다
  2. GET /public/v1/job/{job_id}를 폴링하여 상태를 확인합니다
  3. 상태가 Succeed가 되면 image_urls에서 결과를 확인합니다 (스프라이트 시트 및 GIF)

상태 흐름: Pending → Succeed 또는 Failed

요청 예시​

cURL (단일 이미지):

curl -X POST "https://api.aetherforgeai.com/public/v1/sprite/pulsar-v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "mode=image_to_video" \
-F "images=@/path/to/character.png" \
-F "text=idle breathing" \
-F "is_pixel=true"

cURL (시작/끝 참조 이미지):

curl -X POST "https://api.aetherforgeai.com/public/v1/sprite/pulsar-v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "mode=first_last_frame" \
-F "images=@/path/to/start.png" \
-F "images=@/path/to/end.png" \
-F "text=draw the sword"

cURL (Sprite To Sprite, 레퍼런스 이미지가 있는 GIF):

curl -X POST "https://api.aetherforgeai.com/public/v1/sprite/pulsar-v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "mode=video_restyle" \
-F "images=@/path/to/sprite.gif" \
-F "reference_image=@/path/to/new_character.png"

cURL (단일 이미지, 투명 배경):

curl -X POST "https://api.aetherforgeai.com/public/v1/sprite/pulsar-v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "mode=image_to_video" \
-F "images=@/path/to/character.png" \
-F "text=idle breathing" \
-F "background_color=transparent"