はじめに
2025〜2026年にかけて、SNSで大流行している「AIアクションフィギュア」をご存知ですか?自分の職業や趣味を反映したフィギュアが、透明なブリスターパックに入った状態で生成される — まるで本物のおもちゃのような仕上がりです。
この記事では、Crazyrouter API 経由で GPT-image-2 を呼び出し、AIアクションフィギュアを生成する方法を解説します。
生成結果
実際にAPIで生成したAI開発者フィギュアがこちら:
ポイント:
- フィギュア本体:黒パーカー+メガネ、ノートPC持ち
- 付属品:コーヒーマグ("CODE COFFEE. DEPLOY.")、ラバーダック、デュアルモニター、メカニカルキーボード
- パッケージ文字:「AI DEVELOPER — Build the future.」がクリアに描画
- バーコード+「Powered by GPT-image-2」
GPT-image-2のテキスト描画能力が光る仕上がりです。
環境準備
APIキーの取得
Crazyrouter に登録してAPIキーを取得します。1つのキーで600以上のモデル(GPT-image-2、GPT-5.5、Claude Opus 4.7、DeepSeek V4など)にアクセスできます。
依存パッケージ
pip install openai
実装コード
Python版
from openai import OpenAI
client = OpenAI(
api_key="your-crazyrouter-api-key",
base_url="https://crazyrouter.com/v1"
)
# フィギュアのカスタマイズ
character_name = "AI DEVELOPER"
tagline = "Build the future."
outfit = "black hoodie, glasses, holding a laptop with code on screen"
accessories = [
"a coffee mug with 'CODE COFFEE DEPLOY' text",
"a yellow rubber duck (debugging companion)",
"two monitors showing code editor and neural network diagrams",
"a mechanical keyboard with orange accents"
]
bottom_text = "CODE. TRAIN. AUTOMATE. REPEAT."
accessories_str = ", ".join(accessories)
prompt = f"""
A hyper-realistic product photo of a boxed action figure toy.
The figure is a young Asian male software engineer: {outfit}.
The box is clear plastic blister pack with cardboard backing.
Top of box reads: "{character_name}" in bold letters.
Subtitle: "{tagline}"
Accessories inside the box: {accessories_str}.
Bottom of box: "{bottom_text}"
Small text: "Powered by GPT-image-2"
Include a realistic barcode.
Studio lighting, white background, professional toy photography style.
"""
response = client.images.generate(
model="gpt-image-2",
prompt=prompt,
size="1024x1024",
n=1
)
print(f"生成完了: {response.data[0].url}")
curl版
curl -X POST https://crazyrouter.com/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-crazyrouter-api-key" \
-d '{
"model": "gpt-image-2",
"prompt": "A hyper-realistic product photo of a boxed action figure toy. The figure is a young software engineer wearing a black hoodie and glasses, holding a laptop. Clear plastic blister pack with cardboard backing. Top reads AI DEVELOPER - Build the future. Accessories: coffee mug, rubber duck, two monitors, mechanical keyboard. Bottom text: CODE. TRAIN. AUTOMATE. REPEAT. Powered by GPT-image-2. Barcode. Studio lighting, white background, toy photography.",
"size": "1024x1024",
"n": 1
}'
Node.js版
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "your-crazyrouter-api-key",
baseURL: "https://crazyrouter.com/v1",
});
const response = await client.images.generate({
model: "gpt-image-2",
prompt: `Hyper-realistic boxed action figure: AI DEVELOPER.
Figure wearing black hoodie, glasses, holding laptop.
Accessories: coffee mug, rubber duck, dual monitors, mechanical keyboard.
Clear blister pack, cardboard backing, barcode.
Studio lighting, white background, toy photography.`,
size: "1024x1024",
n: 1,
});
console.log(response.data[0].url);
職業別プロンプトテンプレート 10選
そのまま使えるテンプレートです。character_nameとoutfitを差し替えるだけでOK。
| # | 職業 | タイトル | 服装 | ボトムテキスト |
|---|---|---|---|---|
| 1 | プロダクトマネージャー | PRODUCT MANAGER | ビジネスカジュアル、ホワイトボードマーカー | SHIP IT. ITERATE. REPEAT. |
| 2 | UIデザイナー | UI/UX DESIGNER | タートルネック、Apple Pencil | PIXEL PERFECT. ALWAYS. |
| 3 | データサイエンティスト | DATA SCIENTIST | カジュアルシャツ、Jupyterノート | TRAIN. VALIDATE. DEPLOY. |
| 4 | スタートアップ創業者 | STARTUP FOUNDER | パタゴニアベスト+パーカー | MOVE FAST. BREAK THINGS. |
| 5 | フィットネスコーチ | FITNESS COACH | タンクトップ、スニーカー | NO PAIN. NO GAIN. |
| 6 | シェフ | MASTER CHEF | 白いコック服、シェフハット | TASTE. SEASON. PERFECT. |
| 7 | フォトグラファー | PHOTOGRAPHER | カーゴベスト、カメラストラップ | CAPTURE THE MOMENT. |
| 8 | 音楽プロデューサー | MUSIC PRODUCER | オーバーサイズパーカー、ヘッドフォン | DROP THE BEAT. |
| 9 | 教師 | TEACHER | カーディガン、メガネ、本 | INSPIRE. EDUCATE. EMPOWER. |
| 10 | 猫の飼い主 | CAT PARENT | 猫の毛だらけのセーター | OWNED BY CATS SINCE 2020. |
バッチ生成
複数の職業フィギュアを一括生成:
professions = [
("AI DEVELOPER", "black hoodie, glasses, laptop"),
("DESIGNER", "turtleneck, Apple Pencil, iPad"),
("DATA SCIENTIST", "casual shirt, Jupyter notebook"),
]
for title, outfit in professions:
response = client.images.generate(
model="gpt-image-2",
prompt=f"Hyper-realistic boxed action figure: {title}. "
f"Figure wearing {outfit}. Clear blister pack, "
f"cardboard backing, studio lighting, toy photography.",
size="1024x1024",
n=1
)
print(f"{title}: {response.data[0].url}")
プロンプトのコツ
リアル感を上げる
-
studio lighting, soft shadowsで光影を強化 -
product photography, 85mm lens, shallow depth of fieldでプロ感 -
slight plastic reflection on blister packでパッケージの質感
テキスト描画
- GPT-image-2のテキスト描画は優秀だが、短いテキストほど精度が高い
- 10単語以内を推奨
- 大文字の方が小文字より読みやすい
コスト
| 項目 | 料金(Crazyrouter経由) |
|---|---|
| 1枚(1024×1024) | 約 $0.04〜0.08 |
| 10枚バッチ | 約 $0.5 |
OpenAI公式より割安で、別途OpenAI APIキーの申請も不要です。
まとめ
GPT-image-2 + Crazyrouter APIで、誰でも簡単にオリジナルのアクションフィギュア画像を生成できます。テキスト描画の精度が高いため、パッケージの文字まで本物そっくりに仕上がります。
ぜひ自分だけのフィギュアを作ってみてください!
🚀 Crazyrouter — 1つのAPIキーで600以上のモデルにアクセス。GPT-image-2、GPT-5.5、Claude Opus 4.7、DeepSeek V4など。
