Computer vision solutions ยท 10โ15%
Image & video generation
Image generation
An image-generation model creates original images from a text description โ it generates, it doesn’t search a catalog.
- Models: gpt-image-1 (OpenAI), FLUX (Black Forest Labs). Catalog filter: inference task = text to image.
- Call
client.images.generate(model, prompt, n, size). The response carries the image as base64 inb64_json; decode it and save it to a file. - Generated images are original, not retrieved.
- Editing workflows: inpainting โ regenerating only a masked region of an image while leaving the rest untouched; plus prompt-driven modifications and reference images to steer output.
Video generation โ Sora 2
Sora 2 is OpenAI’s video-generation model in Foundry: it creates video (with audio) from a text prompt, a reference image, or by remixing an existing video.
| Fact | Value |
|---|---|
| Models | sora-2, sora-2-pro |
| Sizes | 1280ร720 landscape, 720ร1280 portrait |
| Duration | 4, 8, 12 s (default 4) |
Reference image (input_reference) | JPEG/PNG/WebP, resolution must match video size, no human faces |
Remix (remix_video_id) | Modify existing video, preserve structure โ one focused change |
| Audio | Supported in output |
| Rate limit | 2 concurrent jobs |
| Download window | 24 h after completion |
Async pattern โ generation takes minutes, so the API works in three steps:
- Start the job with
videos.create(). - Poll
videos.retrieve(id)until the status leavesqueued/in_progress. - Download the result with
videos.download_content(id, variant="video").
Possible states: queued, in_progress, completed, failed, cancelled.
Prompting videos
Describe the shot like a storyboard, in this order: camera framing, then subject detail, then the action in beats, then lighting and palette, then style. Specific beats (“takes four steps, pauses”) beat vague verbs. Shorter clips follow instructions better โ stitch two 4s clips over one 8s.
A harmful prompt returns no video (content moderation filter). A reference image containing a human face gets rejected.