メインコンテンツへスキップ

スプライト作成 V2

Purpose

アップロードした画像を基にスプライトアニメーションを生成します。ピクセルアートスタイルまたは一般スタイルでスプライトシートを作成できます。

Method and Path

POST /public/v1/sprite/make-sprite/v2

Authentication

認証ページを参照してください。Bearerトークンが必要です。

必須ヘッダー:

Authorization: Bearer {your_api_key}

Request Fields

フィールド名タイプ必須説明
start_frame_imagefileはい開始フレームの基盤となる画像ファイル
end_frame_imagefileいいえ終了フレームの基盤となる任意の画像ファイル
textstringはいスプライト生成のためのテキストプロンプト
frameintegerはい生成するフレーム数。必ず49, 81, 121のいずれかである必要があります
is_pixelbooleanはい画像がピクセルアートスタイルか。true または false

Response

成功レスポンス (200 OK):

{
"job_id": "uuid-string"
}
フィールドタイプ説明
job_idstring作成されたジョブの一意識別子。Get Job Statusで結果を照会します

Error / Validation Rules

状況HTTP状態エラーメッセージ
Invalid image file400"Invalid image file"
frame値が許可された値でない400"frame should be one of 49, 81, 121"
認証失敗401無効なAPIキー

許可されたフレーム値:

  • 49, 81, 121

Async Job Behavior

このエンドポイントは非同期ジョブを作成します。リクエスト即座にjob_idを返し、実際のスプライト生成はバックグラウンドで進行します。

ポーリング方法:

  1. レスポンスで受け取ったjob_idを保存します
  2. GET /public/v1/job/{job_id}をポーリングして状態を確認します
  3. 状態がSucceedになるとimage_urlsで結果を確認します (GIFおよび個別フレーム画像)

状態フロー: PendingSucceed または Failed

Example Request

cURL (ピクセルアートスタイル):

curl -X POST "https://api.aetherforgeai.com/public/v1/sprite/make-sprite/v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "start_frame_image=@/path/to/character.png" \
-F "text=walking animation" \
-F "frame=49" \
-F "is_pixel=true"

cURL (一般スタイル):

curl -X POST "https://api.aetherforgeai.com/public/v1/sprite/make-sprite/v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "start_frame_image=@/path/to/character.png" \
-F "text=running animation cycle" \
-F "frame=81" \
-F "is_pixel=false"

cURL (一般スタイル + 終了フレーム):

curl -X POST "https://api.aetherforgeai.com/public/v1/sprite/make-sprite/v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "start_frame_image=@/path/to/character_start.png" \
-F "end_frame_image=@/path/to/character_end.png" \
-F "text=running animation cycle" \
-F "frame=81" \
-F "is_pixel=false"