
StepFun image generation and image editing model for text-to-image and single-image edits.
StepFun image generation and image editing model for text-to-image and single-image edits.
Attach image or images to trigger image-edit mode. Reference images use image editing mode; text-only prompts use image generation mode.
Also known as StepFun Step Image Edit 2, Step-Image-Edit-2
step-image-edit-2/v1/images/generationsPOST/v1/images/editsstepfun/step-image-edit-2Live pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.
Step Image Edit 2 runs through POST /v1/images/generations. The request returns a job_id right away; poll GET /v1/jobs/{job_id} until the job completes and read the output URLs from the result. Or add "sync": true to skip polling: the request stays open and returns the finished OpenAI-style image response directly, so OpenAI SDKs work as-is. Get an API key from the EmpirioLabs dashboard.
curl https://api.empiriolabs.ai/v1/images/generations \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "step-image-edit-2",
"prompt": "Describe what you want Step Image Edit 2 to generate."
}'curl https://api.empiriolabs.ai/v1/jobs/JOB_ID \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY"import requests
response = requests.post(
"https://api.empiriolabs.ai/v1/images/generations",
headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
json={
"model": "step-image-edit-2",
"prompt": "Describe what you want Step Image Edit 2 to generate.",
},
)
job = response.json()
# Generation runs as an async job. Poll until it completes.
import time
while True:
status = requests.get(
f"https://api.empiriolabs.ai/v1/jobs/{job['job_id']}",
headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
).json()
if status.get("status") in ("completed", "failed"):
print(status)
break
time.sleep(5)Request parameters supported by the Step Image Edit 2 API on EmpirioLabs. Defaults apply when a field is omitted.
| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
| prompt | string | - | max 512 | Prompt or edit instruction. Maximum 512 characters. |
| image | image | - | - | Reference image URL, data URI, or uploaded image. When present, image editing mode is used. |
| images | array | - | - | Alias for image. StepFun Image Edit 2 currently uses one input image. |
| size | enum | 1024x1024 | 1024x1024, 768x1360, 896x1184, 1360x768, 1184x896 | Output size. |
| n | integer | 1 | 1 to 1 | Accepted for API compatibility. StepFun currently returns one image. |
| response_format | enum | url | url, b64_json | Return signed image URLs by default or include base64 image data. |
| seed | integer | - | 0 to 2147483647 | Random seed for reproducible generation. |
| steps | integer | 8 | 1 to 50 | Sampling steps. |
| cfg_scale | number | 1 | 1 to 10 | Classifier-free guidance scale. |
| negative_prompt | string | - | max 512 | Negative prompt. Maximum 512 characters. |
| text_mode | boolean | false | - | Enable text-focused rendering mode. |
Supports text-to-image and single-image editing. Prompt and negative_prompt are limited to 512 characters. Supported sizes are 1024x1024, 768x1360, 896x1184, 1360x768, and 1184x896. n is currently limited to 1.
Generated images pass an automated content-safety check. An image flagged as explicit is not returned. Because the image is generated before the check runs, a flagged generation is still billed.
On EmpirioLabs, Step Image Edit 2 is billed pay as you go: Output image $0.003 per generated image. The live rate card on this page always matches what the API charges.
Step Image Edit 2 is served through POST /v1/images/generations on api.empiriolabs.ai with standard bearer-token authentication.
Yes. The EmpirioLabs playground runs Step Image Edit 2 in the browser with the same parameters the API exposes, so you can test prompts before writing code.
Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.
Check out our pricing or reach out if you want your own model deployed on our stack.