Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/letta-ai/letta-code/image-generationnpx skills add letta-ai/letta-code --skill image-generationgit clone --depth 1 https://github.com/letta-ai/letta-codeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00047 | $0.01347 |
| Opus 5 | $0.00023 | $0.00674 |
| Sonnet 5 | $0.00009 | $0.00269 |
| Haiku 4.5 | $0.00005 | $0.00135 |
Grade A, and why
image-generation scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -sS -X POST "$base_url/v1/images/generations" \ How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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:
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; credits:", response["billing"]["credits_charged"])
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:

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. Also tell the user the credits_charged.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 125 lines · 47 tokens per session scan A 76e394e5f1b2
image-generation is a skill published in the GitHub repository letta-ai/letta-code (3,156 stars, last pushed 2d ago), licensed Apache-2.0. It adds 47 tokens to every session and 1,347 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
openai-whisper-api
Transcribe audio via OpenAI Audio Transcriptions API (Whisper).
tts-voice
Convert text to natural speech audio. Uses Edge-TTS (free) or OpenAI TTS. Excellent Chinese voice support.
image-gen
Generate images via DALL-E, Stable Diffusion, or free alternatives. Supports multi-channel delivery.
voice-note
Convert voice messages to text (STT) and text to voice (TTS). Supports Whisper local model and Edge-TTS.
image-generate
Generate an image from a text prompt via the cloud LLM image proxy, persist it as a content-addressed workspace asset, and return a ContentBlock that downstream renderers can attach. Use whenever the user asks "draw / generate / make an image of …", an agent needs a diagram / illustration as a follow-up artifact, or a…
sonoscli
Control Sonos speakers (discover/status/play/volume/group).