image-generation
This skill generates images from text prompts using Letta's hosted API, supporting multiple providers (Flux, Gemini, OpenAI) with different strengths.
Identity proven by GitHub's verified organisation badge (letta-ai)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- Apache-2.0 (permissive)
- Pin
- c1033d9pinned Oct 9, 2026
- Context cost
- about 1,200 tokenswhen the skill loads
- GitHub stars
- 3,549on letta-ai/letta-code
- Scripts
- None found
What it does
“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, or photo.”
Generated summary from the skill's own text
This skill generates images from text prompts using Letta's hosted API, supporting multiple providers (Flux, Gemini, OpenAI) with different strengths. The agent calls the endpoint, retrieves base64-encoded or signed URLs, saves images locally, and displays them inline in markdown. It also supports editing and remixing existing images by passing them as input.
When to use it
- User requests image creation, illustration, logo, icon, or diagram generation
- User wants to edit or remix an existing image with text instructions
- Photoreal output is needed or specific image dimensions and quality are required
- Multiple image variations should be generated from a single prompt
When not to
- User needs image generation via their own API key or BYOK provider integration
- Task requires bulk image processing or batch operations across many prompts
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add letta-ai/letta-code --skill image-generationInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install letta-ai/letta-code image-generation@c1033d9f7e8863a869cd2031805cfd2c66c165b9Installs the commit we checked (c1033d9).
Copy by hand
Download the folder at c1033d9 and put it in .claude/skills/image-generation for Claude Code and in .agents/skills/image-generation for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "image-generation" by Letta. Source, pinned to commit c1033d9f7e8863a869cd2031805cfd2c66c165b9: https://github.com/letta-ai/letta-code/tree/c1033d9f7e8863a869cd2031805cfd2c66c165b9/src/skills/builtin/image-generation 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/image-generation/ for Claude Code and .agents/skills/image-generation/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/letta/image-generation
SKILL.md at the pin
---
name: image-generation
description: 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, or photo.
---
# 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.
## Example
Generate the image, save it locally, then show it inline:
```bash
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:
```markdown
Here's the mascot:

```
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`\|`auto` | Optional (OpenAI; higher = more credits). |
| `output_format` | `png`\|`jpeg`\|`webp` | Optional (OpenAI). |
| `input_images` | string[] (max 14) | Optional. Base64 **data URLs** for edit/remix. |
| `seed` | int | Optional. |
| Provider | Default model | Use for |
|----------|---------------|---------|
| `flux` | `flux-2-pro` | Default for normal text-to-image. High-quality general image generation; commonly returns signed URLs. |
| `gemini` | `gemini-3-pro-image` | Strong prompt adherence, image editing/remix. |
| `openai` | `gpt-image-2` | Photoreal output, explicit `size`/`quality`/`output_format`. |
Default to `flux` for normal text-to-image requests. Use `gemini` when the user
provides input images or wants image editing/remix. Use `openai` when the user
wants photoreal output or a specific size/quality.
## Response
```json
{
"provider": "gemini",
"model": "gemini-3-pro-image",
"images": [{ "b64_json": "<base64>", "mime_type": "image/png" }],
"billing": { "credits_charged": 12, "...": "..." }
}
```
Each `images[]` entry has either `b64_json` or `url`, plus `mime_type`. Gemini
always returns `b64_json`. Flux commonly returns a signed `url`; download it to
your local image file immediately because signed URLs expire. If OpenAI returns a
`url`, download that URL instead of base64-decoding.
## Editing / remixing images
Pass source images in `input_images` as base64 **data URLs**
(`data:<mime>;base64,<data>`) and describe the edit in `prompt`. Gemini handles
multi-image edits well. To build a data URL from a local file:
```bash
DATA_URL="data:image/png;base64,$(base64 < input.png | tr -d '\n')"
```
## Notes
- **Billing**: every success charges credits; don't loop needlessly.
- **Errors**: `402` = insufficient credits (`credits_required` in body); `400`/`500`
return `{ "message": "..." }` — surface it to the user.
- Only `flux`, `gemini`, and `openai` are supported here.
From letta-ai/letta-code at c1033d9, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at c1033d9Files
- SKILL.md5.0 KB · a4f201d9a874
1 file, 5.0 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at c1033d9More from Letta
acquiring-skills
Enables the agent to discover and install skills from multiple registries including Hermes Skills Hub, ClawHub, GitHub, and community repositories.
Agents not labelled yet · about 3.1K tokens · pinned 7 days ago
browser-use
Control a real browser using Chrome DevTools Protocol over WebSocket to navigate pages, interact with UI, fill forms, scrape sites, and capture screenshots or…
Claude Code, Codex, Cursor +4 · about 3.2K tokens · pinned 7 days ago
Context Doctor
Context Doctor investigates and repairs an agent's context including memory, system prompt, and skills by analyzing observed behavior as evidence.
Claude Code, Codex, Cursor +3 · about 1K tokens · pinned 7 days ago
creating-mods
This skill creates and edits mod files that extend local Letta instances with tools, slash commands, event handlers, custom model providers, permissions, and…
Claude Code, Codex, Cursor +4 · about 2.4K tokens · pinned 7 days ago
creating-skills
This skill guides developers in creating modular packages that extend Letta Code agent capabilities with specialized knowledge, workflows, tool integrations…
Contains scripts
Claude Code, Codex, Cursor +3 · about 4.5K tokens · pinned 7 days ago
curating-memory-palace
This skill lets the agent maintain a Memory Palace, a structured dashboard view that shows the user what the agent is working on, what it could do next, and…
Agents not labelled yet · about 3.1K tokens · pinned 7 days ago
Related in Media and creative
all-images-ai-automation
This skill automates All Images AI operations by discovering and executing tools through Composio's All Images AI toolkit via Rube MCP.
by ComposioOfficial publisher
Agents not labelled yet · about 710 tokens · pinned 7 days ago
remotion-best-practices
This skill routes the agent through Remotion's specialized knowledge bases for video creation, editing, and deployment.
by RemotionOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 920 tokens · pinned 7 days ago
remotion-best-practices
This skill routes the agent to specialized Remotion sub-skills based on the user's task, covering video creation, project setup, React markup, maps…
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 1K tokens · pinned 7 days ago
remotion-captions
This skill enables video caption workflows including transcribing audio to generate captions, displaying captions in videos, and importing captions from SRT…
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 220 tokens · pinned 7 days ago
remotion-captions
This skill enables the agent to work with captions in Remotion videos by transcribing audio to generate captions, displaying them in videos, and importing…
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 270 tokens · pinned 7 days ago
remotion-create
This skill scaffolds a new Remotion video project, opens the browser-based Studio for live preview, and guides composition development using React markup.
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 680 tokens · pinned 7 days ago
Open roles at Letta
4 open roles on the jobs board
- Research Engineer / Scientist, Post-Training
San Francisco, California, United States (On-site)
- Research Engineer / Scientist, Self-Improvement
San Francisco, California, United States (On-site)
- Software Engineer, Agent Harness
San Francisco, California, United States (On-site)
- Research Engineer / Scientist, Memory
San Francisco, California, United States (On-site)