Most prompt guides stop at the prompt. This one goes a step further. It covers prompt patterns for an image model (gpt-image-2) and a video model (seedance-2), then shows how to run them from code so you can iterate systematically instead of copy-pasting into a UI.
Both models are reachable through ToAPIs, an OpenAI-compatible gateway with one API key for text, image, video and audio models. You can test prompts in its playground first, then script them.
Part 1: Image prompts (gpt-image-2)
A reliable structure for image prompts:
[Subject] + [Setting] + [Style/Medium] + [Lighting] + [Composition] + [Details/Constraints]
Pattern A: Product shot
A ceramic coffee mug with a matte sage-green glaze on a light oak table,
soft studio photography, diffused window light from the left,
centered composition with generous negative space, no text, no logos.
Pattern B: Editorial illustration
Flat vector illustration of a developer reading documentation beside a window,
limited palette of navy, coral and cream, subtle paper texture,
wide 16:9 banner composition, friendly and calm mood.
Pattern C: Style transfer by description
A city street at night rendered as a 1970s travel poster:
bold geometric shapes, grainy print texture, warm sunset colors,
large empty area at the top for a headline.
Tips that tend to help:
- State what you don't want ("no text", "no watermark") explicitly.
- Name the medium ("watercolor", "35mm photo", "isometric 3D").
- Describe the light. It changes the mood more than almost any other word.
- Keep one idea per prompt. Split complex scenes into separate generations.
Part 2: Video prompts (seedance-2)
Video adds time, so the prompt needs motion and camera:
[Subject] + [Action] + [Setting] + [Camera movement] + [Lighting/Mood] + [Pacing]
Pattern D: Establishing shot
A small fishing village at dawn, mist over the harbor, boats gently rocking,
slow aerial drone shot moving forward, soft golden light, calm pacing.
Pattern E: Character action
A barista pours latte art into a white cup, close-up on the hands,
static camera with shallow depth of field, warm café lighting,
steam rising slowly.
Pattern F: Product reveal
A pair of running shoes rotates slowly on a pedestal,
camera orbits 180 degrees, clean white background,
crisp studio lighting, smooth and steady motion.
Video-specific tips:
- Describe one main motion. Several competing actions often look chaotic.
- Always specify the camera: static, pan, orbit, dolly or drone.
- Words like "slow", "gentle" and "steady" make it easier to get coherent movement.
Part 3: Running prompts from code
Here's a small harness to batch-test the image patterns:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["TOAPIS_API_KEY"],
base_url="https://toapis.com/v1",
)
prompts = {
"product_mug": "A ceramic coffee mug with a matte sage-green glaze on a light oak table, soft studio photography, no text.",
"editorial": "Flat vector illustration of a developer reading documentation beside a window, navy, coral and cream palette.",
}
for name, prompt in prompts.items():
result = client.images.generate(model="gpt-image-2", prompt=prompt)
item = result.data[0]
print(name, "->", item.url or "base64 image returned")
And a single video request:
import requests
resp = requests.post(
"https://toapis.com/v1/videos/generations",
headers={"Authorization": f"Bearer {os.environ['TOAPIS_API_KEY']}"},
json={
"model": "seedance-2",
"prompt": "A barista pours latte art into a white cup, close-up on the hands, static camera, warm café lighting.",
},
timeout=60,
)
resp.raise_for_status()
print(resp.json())
Video generation is a longer job. Check the docs for the response format and how to poll for the finished result.
Part 4: Let a text model write the first draft
Use a chat model to expand short ideas into the structures above:
template = (
"Rewrite the idea as a video prompt with: subject, action, setting, "
"camera movement, lighting/mood, pacing. One paragraph."
)
r = client.chat.completions.create(
model="gpt-5.6-terra",
messages=[{"role": "system", "content": template},
{"role": "user", "content": "dog surfing at sunset"}],
)
print(r.choices[0].message.content)
A simple iteration loop
- Draft with a pattern.
- Generate two or three variations, changing one variable at a time (light, camera or style).
- Log prompt → result, so you learn what each model responds to.
- Promote winners into a reusable prompt library.
Docs for the endpoints: https://docs.toapis.com
Top comments (0)