@letta-ai/letta-code 0.34.41 → 0.34.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp-client.js +2 -2
- package/dist/mcp-client.js.map +1 -1
- package/dist/mcp-oauth.js +2 -2
- package/dist/mcp-oauth.js.map +1 -1
- package/dist/types/agent/model.d.ts +17 -2
- package/dist/types/agent/model.d.ts.map +1 -1
- package/dist/types/backend/api/usage-cost.d.ts +8 -0
- package/dist/types/backend/api/usage-cost.d.ts.map +1 -0
- package/dist/types/backend/backend.d.ts.map +1 -1
- package/dist/types/backend/dev/provider-turn-executor.d.ts +3 -2
- package/dist/types/backend/dev/provider-turn-executor.d.ts.map +1 -1
- package/dist/types/backend/local/compaction.d.ts +9 -1
- package/dist/types/backend/local/compaction.d.ts.map +1 -1
- package/dist/types/backend/local/local-backend.d.ts +1 -1
- package/dist/types/backend/local/local-backend.d.ts.map +1 -1
- package/dist/types/permissions/checker.d.ts.map +1 -1
- package/dist/types/permissions/cross-agent-guard.d.ts.map +1 -1
- package/dist/types/permissions/file-path-args.d.ts +5 -0
- package/dist/types/permissions/file-path-args.d.ts.map +1 -0
- package/dist/types/permissions/matcher.d.ts.map +1 -1
- package/dist/types/permissions/workspace-sandbox.d.ts.map +1 -1
- package/dist/types/telemetry/index.d.ts +3 -1
- package/dist/types/telemetry/index.d.ts.map +1 -1
- package/dist/types/telemetry/permission-mode.d.ts +9 -0
- package/dist/types/telemetry/permission-mode.d.ts.map +1 -0
- package/dist/types/tools/manager.d.ts.map +1 -1
- package/dist/types/tools/toolset-catalog.d.ts +1 -1
- package/dist/types/tools/workflow/sdk-spawner.d.ts.map +1 -1
- package/dist/types/types/approval-classification-protocol.d.ts +2 -0
- package/dist/types/types/approval-classification-protocol.d.ts.map +1 -1
- package/dist/types/types/protocol.d.ts +6 -1
- package/dist/types/types/protocol.d.ts.map +1 -1
- package/dist/types/usage/cost.d.ts +24 -0
- package/dist/types/usage/cost.d.ts.map +1 -0
- package/dist/types/utils/file-path.d.ts +1 -1
- package/dist/types/utils/file-path.d.ts.map +1 -1
- package/dist/types/websocket/listener/input-disposition.d.ts +1 -0
- package/dist/types/websocket/listener/input-disposition.d.ts.map +1 -1
- package/letta.js +1157 -896
- package/npm-shrinkwrap.json +19 -19
- package/package.json +2 -2
- package/scripts/check-test-coverage.cjs +1 -0
- package/scripts/run-unit-tests.cjs +1 -0
- package/scripts/source-file-size-baseline.json +2 -2
- package/skills/image-generation/SKILL.md +135 -5
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letta-ai/letta-code",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.43",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"packages": {
|
|
6
6
|
"node_modules/@alcalzone/ansi-tokenize": {
|
|
@@ -2272,13 +2272,13 @@
|
|
|
2272
2272
|
}
|
|
2273
2273
|
},
|
|
2274
2274
|
"node_modules/@smithy/fetch-http-handler": {
|
|
2275
|
-
"version": "5.8.
|
|
2276
|
-
"resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.8.
|
|
2277
|
-
"integrity": "sha512-
|
|
2275
|
+
"version": "5.8.1",
|
|
2276
|
+
"resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.8.1.tgz",
|
|
2277
|
+
"integrity": "sha512-h8BdMUrUBhMhMaeK7QqAdINRZezCGuYOCpcOZZ1ewxbHST9rdTd09xwNpvLTYfzDRehxQiReK4SKbdYZxBA+ew==",
|
|
2278
2278
|
"license": "Apache-2.0",
|
|
2279
2279
|
"dependencies": {
|
|
2280
|
-
"@smithy/core": "^3.
|
|
2281
|
-
"@smithy/types": "^4.
|
|
2280
|
+
"@smithy/core": "^3.39.0",
|
|
2281
|
+
"@smithy/types": "^4.20.0",
|
|
2282
2282
|
"tslib": "^2.6.2"
|
|
2283
2283
|
},
|
|
2284
2284
|
"engines": {
|
|
@@ -3016,9 +3016,9 @@
|
|
|
3016
3016
|
}
|
|
3017
3017
|
},
|
|
3018
3018
|
"node_modules/cron-parser": {
|
|
3019
|
-
"version": "5.10.
|
|
3020
|
-
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-5.10.
|
|
3021
|
-
"integrity": "sha512-
|
|
3019
|
+
"version": "5.10.4",
|
|
3020
|
+
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-5.10.4.tgz",
|
|
3021
|
+
"integrity": "sha512-TagNqYzoV/C7Ty7VAQjrQg+57WsEOuQEUh0tWT5Dc+l/GOuoAdWVIzFU0CqYdQswqdjUalrdmOvaMtQhErYZTA==",
|
|
3022
3022
|
"license": "MIT",
|
|
3023
3023
|
"dependencies": {
|
|
3024
3024
|
"luxon": "^3.7.2"
|
|
@@ -3247,9 +3247,9 @@
|
|
|
3247
3247
|
}
|
|
3248
3248
|
},
|
|
3249
3249
|
"node_modules/es-toolkit": {
|
|
3250
|
-
"version": "1.53.
|
|
3251
|
-
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.53.
|
|
3252
|
-
"integrity": "sha512-
|
|
3250
|
+
"version": "1.53.2",
|
|
3251
|
+
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.53.2.tgz",
|
|
3252
|
+
"integrity": "sha512-iUqZ+NlwH4jUgRmXZUxFBsV/9762TQEa1O4IXLFBmDEjVHScBytKuseX23I0+v9ShZ5MYxEx6WKNzm6IPnex8g==",
|
|
3253
3253
|
"license": "MIT",
|
|
3254
3254
|
"workspaces": [
|
|
3255
3255
|
"docs",
|
|
@@ -3595,9 +3595,9 @@
|
|
|
3595
3595
|
}
|
|
3596
3596
|
},
|
|
3597
3597
|
"node_modules/glob": {
|
|
3598
|
-
"version": "13.0.
|
|
3599
|
-
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.
|
|
3600
|
-
"integrity": "sha512-
|
|
3598
|
+
"version": "13.0.7",
|
|
3599
|
+
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.7.tgz",
|
|
3600
|
+
"integrity": "sha512-wfsFgXQ8A3SEI9XGf7Nl3Y9l7ffSrGh7SUCT7vU/2CzYPep9kjxAn1S40F9OPKxAMGCVl7HtNlJhrCJUeUq83g==",
|
|
3601
3601
|
"license": "BlueOak-1.0.0",
|
|
3602
3602
|
"dependencies": {
|
|
3603
3603
|
"minimatch": "^10.2.2",
|
|
@@ -5509,9 +5509,9 @@
|
|
|
5509
5509
|
}
|
|
5510
5510
|
},
|
|
5511
5511
|
"node_modules/vfile-message": {
|
|
5512
|
-
"version": "4.0.
|
|
5513
|
-
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.
|
|
5514
|
-
"integrity": "sha512-
|
|
5512
|
+
"version": "4.0.4",
|
|
5513
|
+
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.4.tgz",
|
|
5514
|
+
"integrity": "sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg==",
|
|
5515
5515
|
"license": "MIT",
|
|
5516
5516
|
"dependencies": {
|
|
5517
5517
|
"@types/unist": "^3.0.0",
|
|
@@ -5656,7 +5656,7 @@
|
|
|
5656
5656
|
},
|
|
5657
5657
|
"": {
|
|
5658
5658
|
"name": "@letta-ai/letta-code",
|
|
5659
|
-
"version": "0.34.
|
|
5659
|
+
"version": "0.34.43",
|
|
5660
5660
|
"dependencies": {
|
|
5661
5661
|
"@cursor/sdk": "1.1.0",
|
|
5662
5662
|
"@earendil-works/pi-ai": "^0.99.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letta-ai/letta-code",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.43",
|
|
4
4
|
"lettaStartupLogProtocol": 1,
|
|
5
5
|
"lettaConfigDirProtocol": 1,
|
|
6
6
|
"description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
},
|
|
279
279
|
"lettaLifecycleProtocol": 1,
|
|
280
280
|
"lettaRuntimeGraphProtocol": 1,
|
|
281
|
-
"lettaRuntimeGraphSha512": "sha512-
|
|
281
|
+
"lettaRuntimeGraphSha512": "sha512-OHzTPv1j75KoJFojEjv3BcG6VCLDYRMSo989KJlMJxHRMY9CW0psXZbLs34hc9UZ1eXboJjDJFKK5o+zb6JbDA==",
|
|
282
282
|
"patchedDependencies": {
|
|
283
283
|
"@earendil-works/pi-ai@0.99.1": "patches/@earendil-works%2Fpi-ai@0.99.1.patch"
|
|
284
284
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"src/cli/app/AppCoordinator.tsx": 5131,
|
|
8
8
|
"src/cli/app/AppView.tsx": 1732,
|
|
9
9
|
"src/cli/app/use-approval-flow.ts": 1099,
|
|
10
|
-
"src/cli/app/use-configuration-handlers.ts":
|
|
10
|
+
"src/cli/app/use-configuration-handlers.ts": 1400,
|
|
11
11
|
"src/cli/app/use-conversation-loop.ts": 2849,
|
|
12
12
|
"src/cli/app/use-submit-handler.ts": 3791,
|
|
13
13
|
"src/cli/components/AgentSelector.tsx": 1104,
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"src/cli/subcommands/skills.ts": 1243,
|
|
23
23
|
"src/headless.ts": 4827,
|
|
24
24
|
"src/hooks/integration.test.ts": 1147,
|
|
25
|
-
"src/index.ts":
|
|
25
|
+
"src/index.ts": 2543,
|
|
26
26
|
"src/mods/learning-harness.ts": 2434,
|
|
27
27
|
"src/mods/mod-engine.test.ts": 2153,
|
|
28
28
|
"src/mods/mod-engine.ts": 1836,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: image-generation
|
|
3
|
-
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
|
|
3
|
+
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, slide, photo, animated GIF, or SVG.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Image Generation
|
|
@@ -76,20 +76,26 @@ read `billing.credits_charged` from the saved response.
|
|
|
76
76
|
| `model` | string | Optional; defaults per provider (below). |
|
|
77
77
|
| `n` | int 1–4 | Optional, default 1. Request variations in one call. |
|
|
78
78
|
| `size` | string | Optional, e.g. `"1024x1024"` (OpenAI). |
|
|
79
|
-
| `quality` | `low`\|`medium`\|`high`\|`auto` | Optional (OpenAI; higher = more credits). |
|
|
80
|
-
| `
|
|
79
|
+
| `quality` | `low`\|`medium`\|`high`\|`xhigh`\|`max`\|`auto` | Optional (OpenAI; higher = more credits; `xhigh`/`max` need GPT Image 2.6). |
|
|
80
|
+
| `background` | `auto`\|`opaque`\|`transparent` | Optional (OpenAI). Transparent works with png, webp and svg. |
|
|
81
|
+
| `complexity` | `low`\|`medium`\|`high` | Optional (OpenAI GPT Image 2.6). How much the model plans before rendering; defaults to `high`. |
|
|
82
|
+
| `output_format` | `png`\|`jpeg`\|`webp`\|`gif`\|`svg` | Optional (OpenAI). `gif` and `svg` need GPT Image 2.6; see below. |
|
|
83
|
+
| `frame_count` / `frame_duration_ms` | int 2–16 / int 20–2000 | Optional, `gif` only. Defaults 9 frames, 200 ms. |
|
|
84
|
+
| `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`. |
|
|
81
85
|
| `input_images` | string[] (max 14) | Optional. Base64 **data URLs** for edit/remix. |
|
|
86
|
+
| `markup_image` | string | Optional (OpenAI edits). Base64 data URL of a transparent annotation layer marking where to change the first input image. |
|
|
82
87
|
| `seed` | int | Optional. |
|
|
83
88
|
|
|
84
89
|
| Provider | Default model | Use for |
|
|
85
90
|
|----------|---------------|---------|
|
|
86
91
|
| `flux` | `flux-2-pro` | Default for normal text-to-image. High-quality general image generation; commonly returns signed URLs. |
|
|
87
92
|
| `gemini` | `gemini-3-pro-image` | Strong prompt adherence, image editing/remix. |
|
|
88
|
-
| `openai` | `gpt-image-2` | Photoreal output, explicit `size`/`quality
|
|
93
|
+
| `openai` | `gpt-image-2.6-flare` | Photoreal output, explicit `size`/`quality`, animated GIFs, SVG vectors, markup-guided edits. Use `gpt-image-2.6-sunburst` for detailed work and consistency across edits. |
|
|
89
94
|
|
|
90
95
|
Default to `flux` for normal text-to-image requests. Use `gemini` when the user
|
|
91
96
|
provides input images or wants image editing/remix. Use `openai` when the user
|
|
92
|
-
wants photoreal output
|
|
97
|
+
wants photoreal output, a specific size/quality, an animated GIF, an SVG, or an
|
|
98
|
+
edit guided by a marked-up region.
|
|
93
99
|
|
|
94
100
|
## Response
|
|
95
101
|
|
|
@@ -117,6 +123,130 @@ multi-image edits well. To build a data URL from a local file:
|
|
|
117
123
|
DATA_URL="data:image/png;base64,$(base64 < input.png | tr -d '\n')"
|
|
118
124
|
```
|
|
119
125
|
|
|
126
|
+
## Prompting (applies to every provider)
|
|
127
|
+
|
|
128
|
+
Write the prompt like a brief for the image you need, then inspect the result
|
|
129
|
+
and refine one thing at a time.
|
|
130
|
+
|
|
131
|
+
1. **Define the result.** Name the subject and the intended use (product photo,
|
|
132
|
+
ad, diagram, slide, logo, UI mockup). Give composition, aspect ratio and
|
|
133
|
+
placement constraints. For complex requests, use labeled sections: scene,
|
|
134
|
+
subject, details, constraints.
|
|
135
|
+
2. **Describe what's visible.** Materials, lighting, colors, medium, framing,
|
|
136
|
+
texture. Say "photorealistic" or "real photograph" when that's the goal.
|
|
137
|
+
Camera terms ("35mm film, 50mm lens, shallow depth of field") are appearance
|
|
138
|
+
cues. For moody scenes, give scale, atmosphere and color, not just mood words.
|
|
139
|
+
3. **Specify people and actions.** Body framing, scale, gaze and interaction:
|
|
140
|
+
"full body visible, feet included", "looking down at the open book".
|
|
141
|
+
4. **Exact text goes in quotes**, with position, typography and how many times
|
|
142
|
+
it should appear ("render the tagline exactly once"). Spell unusual names
|
|
143
|
+
letter by letter. Ask for "no extra text, no watermarks, no unrelated logos",
|
|
144
|
+
then check spelling in the output. Use `quality: "high"` for small text,
|
|
145
|
+
legends, axes, dense labels or slides.
|
|
146
|
+
5. **Slides, charts and diagrams** are artifact specs, not illustrations: name
|
|
147
|
+
the deliverable, canvas and hierarchy, include the real numbers and labels,
|
|
148
|
+
and ask for readable type, clean spacing and no decorative clutter. Use a
|
|
149
|
+
landscape size (`1536x1024`, or `1536x864` for 16:9). Check every number the
|
|
150
|
+
model renders; it may invent extras. For educational visuals, state the
|
|
151
|
+
audience and lesson goal and list required and forbidden components.
|
|
152
|
+
6. **UI previews**: describe the product as if it already ships (layout,
|
|
153
|
+
hierarchy, real interface elements), not as concept art.
|
|
154
|
+
7. **Comics and storyboards**: one concrete, action-focused visual beat per panel.
|
|
155
|
+
8. **Logos**: brand, defining shapes, "strong silhouette, reads at small and
|
|
156
|
+
large sizes, flat, minimal strokes", "original, non-infringing".
|
|
157
|
+
9. **Edits: separate the change from what must stay.** "Change only X", then
|
|
158
|
+
list what to preserve (identity, face, pose, geometry, layout, lighting,
|
|
159
|
+
labels, camera angle) and what to exclude. Repeat the preserve list on every
|
|
160
|
+
follow-up edit.
|
|
161
|
+
10. **Give each reference image a role by number**: "image 1 is the scene,
|
|
162
|
+
image 2 is the dog; put the dog on the sofa in image 1, keep everything else
|
|
163
|
+
unchanged". For style references, say which part to borrow (palette,
|
|
164
|
+
texture, medium) and describe the new subject separately.
|
|
165
|
+
11. **Iterate deliberately.** Feed the previous output back as the next
|
|
166
|
+
`input_images[0]`, ask for one change, and restate the critical constraints.
|
|
167
|
+
For a recurring character, generate a character reference first, then reuse
|
|
168
|
+
it and repeat the defining details in every scene.
|
|
169
|
+
|
|
170
|
+
## OpenAI GPT Image 2.6
|
|
171
|
+
|
|
172
|
+
The default OpenAI model is `gpt-image-2.6-flare`, the faster one and fine for
|
|
173
|
+
most work. Use `gpt-image-2.6-sunburst` when detail, dense layout or edit
|
|
174
|
+
accuracy matters; it keeps characters and products more consistent across
|
|
175
|
+
edits.
|
|
176
|
+
|
|
177
|
+
- **`quality`** controls rendering detail (texture, small lettering): `low`,
|
|
178
|
+
`medium`, `high`, and on 2.6 also `xhigh` and `max`. Higher costs more.
|
|
179
|
+
- **`complexity`** controls how much the model plans the scene before
|
|
180
|
+
rendering: `low`, `medium` or `high` (OpenAI's default when omitted). Keep the
|
|
181
|
+
default for open-ended prompts and complex layouts, where more planning gives
|
|
182
|
+
a better composition. Use `low` for a targeted edit or a fully specified
|
|
183
|
+
design, where more planning adds latency and can introduce unwanted changes.
|
|
184
|
+
Change quality or complexity, not both at once.
|
|
185
|
+
- **`size`**: `1024x1024`, `1536x1024`, `1024x1536`, or custom with both sides
|
|
186
|
+
multiples of 16 and an aspect ratio between 1:3 and 3:1.
|
|
187
|
+
- **`background`**: `"transparent"` for cutouts and logos (PNG, WebP or SVG).
|
|
188
|
+
Also say "isolated subject, fully transparent background, clean alpha edges,
|
|
189
|
+
no checkerboard" in the prompt, since a drawn checkerboard is not
|
|
190
|
+
transparency. Repeat it on follow-up edits.
|
|
191
|
+
|
|
192
|
+
### Animated GIF
|
|
193
|
+
|
|
194
|
+
Set `"output_format": "gif"` (generations or edits). Optional `frame_count`
|
|
195
|
+
(2–16, default 9) and `frame_duration_ms` (20–2000, default 200); 9 frames at
|
|
196
|
+
200 ms is a 1.8 s loop. Leave `size` unset or use a small size like
|
|
197
|
+
`"512x512"`: all frames must fit the model's pixel limit, so a large size with
|
|
198
|
+
many frames is rejected. If that happens, reduce the frame count or size.
|
|
199
|
+
|
|
200
|
+
For a smooth loop, give the subject a starting pose to return to and say
|
|
201
|
+
whether the camera moves:
|
|
202
|
+
|
|
203
|
+
> A little monkey in an olive-green hooded coat stands in a snowy pine forest
|
|
204
|
+
> at dusk. It holds a glowing amber lantern at chest height, slowly lifts it,
|
|
205
|
+
> looks up and blinks, then lowers it back to its starting pose. Keep the
|
|
206
|
+
> lantern in its hands and the camera still. Make the motion loop smoothly.
|
|
207
|
+
|
|
208
|
+
To animate a still (a sketch, mascot or product shot), pass it in
|
|
209
|
+
`input_images`. Save the decoded `b64_json` bytes as `.gif`.
|
|
210
|
+
|
|
211
|
+
### SVG
|
|
212
|
+
|
|
213
|
+
Set `"output_format": "svg"` with `n: 1`, generations only (no
|
|
214
|
+
`input_images`). Use it for logos, icons and illustrations someone will scale
|
|
215
|
+
or recolor. The image model renders a reference image (`quality` applies to
|
|
216
|
+
it) and a second model writes the SVG from it. `"svg": { "model": "..." }`
|
|
217
|
+
picks that model (`gpt-6.1-terra` by default, or `gpt-6.1-sol`, `gpt-6-luna`,
|
|
218
|
+
`gpt-6-astra`), and `"svg": { "reasoning": { "effort": "high" } }` sets its
|
|
219
|
+
effort. SVG costs more than a raster image. `background: "transparent"` works.
|
|
220
|
+
Decode `b64_json` to UTF-8 XML and save it as `.svg`; the result is static
|
|
221
|
+
vector art with no scripts or embedded rasters.
|
|
222
|
+
|
|
223
|
+
### Markup-guided edits
|
|
224
|
+
|
|
225
|
+
Point at the exact region to change instead of describing it. Pass the photo as
|
|
226
|
+
`input_images[0]` and, as `markup_image` (a data URL), a transparent PNG with
|
|
227
|
+
the **same pixel dimensions** where the region is circled or marked. Then state
|
|
228
|
+
the change in `prompt` ("Make the circled vase cobalt blue; keep the dried
|
|
229
|
+
stems and everything else unchanged"). Markup applies only to the first input
|
|
230
|
+
image; other `input_images` are references. Build the overlay locally:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
python3 -c '
|
|
234
|
+
from PIL import Image, ImageDraw
|
|
235
|
+
src = Image.open("photo.png")
|
|
236
|
+
overlay = Image.new("RGBA", src.size, (0, 0, 0, 0))
|
|
237
|
+
ImageDraw.Draw(overlay).ellipse((420, 260, 640, 560), outline=(255, 0, 0, 255), width=8)
|
|
238
|
+
overlay.save("markup.png")
|
|
239
|
+
'
|
|
240
|
+
MARKUP_URL="data:image/png;base64,$(base64 < markup.png | tr -d '\n')"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Compare the edit with the original to catch changes outside the marked region.
|
|
244
|
+
|
|
245
|
+
For limits not covered here, see OpenAI's
|
|
246
|
+
[GPT Image 2.6 section of the image generation guide](https://developers.openai.com/api/docs/guides/image-generation#gpt-image-26)
|
|
247
|
+
and the [image prompting guide](https://developers.openai.com/api/docs/guides/image-prompting),
|
|
248
|
+
which has worked prompts for each technique above.
|
|
249
|
+
|
|
120
250
|
## Notes
|
|
121
251
|
|
|
122
252
|
- **Billing**: every success charges credits; don't loop needlessly.
|