Developer route
GPT Image 2 VIP API
A route reference built from YingTu’s current model registry. The code sample uses the existing Studio code generator and never includes your real key.
Quickstart
- 1
Create or choose a LaoZhang API Key.
- 2
Copy the current model ID and generated Python example.
- 3
Run one small request and inspect the response before scaling.
Request contract
- Endpoint
- POST /v1/images/generations
- Authentication
- Bearer API Key
- Request family
- OpenAI Images
- Reference images
- Supported
Generated Python request
Replace only the placeholder key and your own prompt. Add reference images through the documented edit path when needed.
gpt-image-2-vip
import requests
import base64
# Configuration
API_KEY = "sk-YOUR_API_KEY" # Replace with your API Key
API_URL = "https://api2.laozhang.ai/v1/images/generations"
# Request headers
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# Generate request
payload = {
"model": "gpt-image-2-vip",
"prompt": "A minimal coffee poster with the exact headline “COFFEE MADE SIMPLE”, high contrast type, warm natural light, clean commercial layout.",
"size": "2048x2048",
"quality": "high"
}
print("Generating image...")
response = requests.post(API_URL, headers=headers, json=payload, timeout=180)
if response.status_code != 200:
print(f"Error: {response.status_code} - {response.text}")
exit(1)
result = response.json()
image_base64 = result.get("data", [{}])[0].get("b64_json")
image_url = result.get("data", [{}])[0].get("url")
if not image_base64 and image_url:
image_response = requests.get(image_url, timeout=60)
image_response.raise_for_status()
image_base64 = base64.b64encode(image_response.content).decode("utf-8")
if not image_base64:
print("No image data in response")
print(result)
exit(1)
with open("output.png", "wb") as f:
f.write(base64.b64decode(image_base64))
print("Image saved: output.png")
Confirm live pricing, balance, and access in your LaoZhang account before a production run.
Pricing authority
The model registry shows YingTu’s configured per-call estimate. Your LaoZhang account is the authority for live pricing, balance, access, and charges.
Route receipt
- Model ID
- gpt-image-2-vip
- Configured estimate
- $0.03/ call
- Output sizes
- 1K · 2K · 4K · 30
- API family
- OpenAI Images
Test this model in Studio
Values on this page come from the same model registry used by the Image Studio.
YingTu · LaoZhang