Command Palette

Search for a command to run...

Назад к скиллам
скилл № 73855

image-generation

Generate images from text prompts (and optionally edit/remix input images). Use when the user asks to create, generate, draw, render, or edit an image…

БесплатноБез исполняемых скриптов
letta-aiот letta-ai★ 3 947 звёзд на GitHub

Установить image-generation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Image Generation

Generate images via Letta's hosted endpoint POST /v1/images/generations. The API usually returns base64 image bytes, but some providers return signed image URLs; save either form to a local image file before replying.

If the ask names a real thing (a product, place, meme, emoji or person), look up what it actually looks like before drawing it. If the real image is all they asked for, post it (slackmojis.com for Slack emoji); otherwise pass it to the generator as a reference so the thing looks right in the new image. A name you don't recognize may be newer than you know, so search it rather than guessing from the words.

Example

Generate the image, save it locally, then show it inline:

base_url="${LETTA_BASE_URL%/}"

curl -sS -X POST "$base_url/v1/images/generations" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"gemini","prompt":"a friendly robot mascot waving, flat vector logo, mint green background","n":1}' \
  > image-response.json

python3 - <<'PY'
import base64, json, urllib.request

with open("image-response.json") as f:
    response = json.load(f)

image = response["images"][0]
if image.get("b64_json"):
    data = base64.b64decode(image["b64_json"])
else:
    data = urllib.request.urlopen(image["url"]).read()

with open("robot-mascot.png", "wb") as f:
    f.write(data)

print("saved robot-mascot.png")
PY

In Bash tools launched by Letta Code, use the runtime-provided LETTA_BASE_URL and LETTA_API_KEY together for Letta API calls. Build URLs relative to ${LETTA_BASE_URL%/} and send Authorization: Bearer $LETTA_API_KEY. Do not hardcode https://api.letta.com: Desktop and remote runtimes may provide a proxy base URL, and the credential may only be valid through that URL. If either variable is missing, the user needs to authenticate with Letta Cloud (or provide a Letta API key); do not ask for an OpenAI/Gemini provider key. This endpoint also does not use /connect BYOK providers — the only provider values supported here are flux, gemini, and openai.

Then show the image to the user by embedding the saved file in your reply:

Here's the mascot:

![a friendly robot mascot waving, flat vector logo](./robot-mascot.png)

The Letta Code UI renders local file paths in markdown image tags, so the image appears inline. Always display generated images this way — don't just report the path, and never paste the raw base64 / a data: URI. The markdown path must match where you saved the file. For n > 1, save each image to its own file and embed each on its own line. Keep credit amounts and billing metadata out of user-facing replies and captions unless the user asks about cost. When asked, read billing.credits_charged from the saved response.

Request body

Field Type Notes
provider "flux" | "gemini" | "openai" Required.
prompt string Required, 1–32000 chars.
model string Optional; defaults per provider (below).
n int 1–4 Optional, default 1. Request variations in one call.
size string Optional, e.g. "1024x1024" (OpenAI).
quality low|medium|high|xhigh|max|auto Optional (OpenAI; higher = more credits; xhigh/max need GPT Image 2.6).
background auto|opaque|transparent Optional (OpenAI). Transparent works with png, webp and svg.
complexity low|medium|high Optional (OpenAI GPT Image 2.6). How much the model plans before rendering; defaults to high.
output_format png|jpeg|webp|gif|svg Optional (OpenAI). gif and svg need GPT Image 2.6; see below.
frame_count / frame_duration_ms int 2–16 / int 20–2000 Optional, gif only. Defaults 9 frames, 200 ms.
svg { "model"?, "reasoning"?: { "effort" } } Optional, svg only. Model that writes the SVG: gpt-6.1-terra (default), gpt-6.1-sol, gpt-6-luna or gpt-6-astra.
input_images string[] (max 14) Optional. Base64 data URLs for edit/remix.
markup_image string Optional (OpenAI edits). Base64 data URL of a transparent annotation layer marking where to change the first input image.
seed int Optional.

Choose a model for the task

These choices reflect models tested as of November 2026; image models change often.

  • For fast, general text-to-image work, use openai with model: "gpt-image-2.6-flare" (the OpenAI default). quality: "low" is the quickest and cheapest; "medium" is sharper and follows constraints such as "no text" more reliably.
  • For edits, multiple reference images, a real person's face, or dense detail, use openai with model: "gpt-image-2.6-sunburst" (quality: "high", or "xhigh" when fine skin and hair detail matter). It holds identity across edits best.
  • flux (model: "flux-2-pro") and gemini (model: "gemini-3-pro-image") are optional
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл image-generation?

Generate images from text prompts (and optionally edit/remix input images). Use when the user asks to create, generate, draw, render, or edit an image, illustration, logo, icon, diagram, slide, photo, animated GIF, or SVG.

Как установить скилл image-generation?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл image-generation запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить image-generation с