Skip to main content
Sora Image (sora_image) and gpt-4o-image are not in LaoZhang API’s current public model catalog. This page is kept for reference by existing integrations. For image generation, use GPT Image 2.5 or another model in Choose an image generation API.

Prerequisites

1

Get API Key

Log in to the LaoZhang API console to get your API key.
2

Configure Billing Mode

The legacy route required a token billing mode of Usage first (按量优先) or Per-call (按次计费). Calls failed when no billing mode was set.Token Settings

Model Overview

The legacy Sora Image route generated images through the chat completions interface (/v1/chat/completions) and returned image URLs in the reply content.

Interface Capabilities

  • Legacy model IDs: sora_image or gpt-4o-image
  • Chat completions interface: Submit prompts through /v1/chat/completions and parse the returned image URL
  • Aspect-ratio parameters: Supports 2:3, 3:2, and 1:1
  • URL return: Responses include downloadable image links

Model Information

Request Examples

Basic Example

Batch Generation Example

Aspect Ratio Guide

Sora Image supports three preset ratios, specified by adding ratio markers at the end of prompts:

Size Usage Examples

Best Practices

1. Prompt Optimization

2. Error Handling

3. Result Saving

Advanced Tips

1. Stylized Generation

2. Scene Templates

Important Notes

  1. Model Selection:
    • sora_image: Legacy Sora Image route
    • gpt-4o-image: Legacy image-generation model ID
    • Neither ID is in the current public model catalog
  2. Ratio Markers:
    • Add ratio marker at end of prompt: 【2:3】, 【3:2】, or 【1:1】
    • Markers must use Chinese brackets 【】
    • Without marker, uses default ratio
  3. URL Extraction:
    • Response contains image URLs in Markdown format
    • Use regex to extract: !\[.*?\]\((https?://[^)]+)\)
    • Download images promptly after generation
  4. Prompt Language:
    • Chinese and English prompts are supported
    • Keep prompts concise and explicit for more stable outputs

FAQ

Q: How is Sora Image different from GPT-Image-1?

A:
  • Sora Image: Legacy route through the chat completions interface; no longer in the public model catalog
  • GPT-Image-1: Earlier GPT Image models on the Images API, still available with token billing; see GPT-Image-1 image generation (archived)
  • For new integrations, use GPT Image 2.5

Q: Can I use English prompts?

A: Yes. Chinese and English prompts are both supported.

Q: How to specify aspect ratio?

A: Add ratio marker at end of prompt: Your prompt【2:3】

Q: Are generated images downloadable?

A: Yes, extract URLs from response and download immediately. URLs may expire after some time.

Q: What’s the maximum prompt length?

A: Keep prompts under about 500 characters; concise, descriptive prompts work best.