API Reference
Complete API documentation for all available models. Select a service type and model to view endpoints, code examples, and additional features.
Select Service Type & Model
Complete API documentation for all available models. Select a service type and model to view endpoints, code examples, and additional features.
Select Service Type & Model
Context Length
2,048
Max Output
--
Input Price
0.0050 0G/image
Output Price
--
Providers
1
Type
Image Editing
0G Router normalizes requests and responses across providers for you. All endpoints follow the OpenAI API format.
Async API — Image editing uses an asynchronous flow: submit a job, then poll for the result. The examples below show both steps.
Submit Endpoint
Poll Endpoint
Code Examples
# 1. Submit async image edit job (multipart/form-data)
curl https://router-api-testnet.integratenetwork.work/v1/async/images/edits \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-F model="qwen/qwen-image-edit-2511" \
-F prompt="Make the sky purple" \
-F image="@input.png" \
-F n=1 \
-F size="1024x1024" \
-F response_format="b64_json"
# Response: {"jobId": "abc123", "status": "pending", "provider_address": "0x..."}
# 2. Poll for result (repeat until status is "completed")
curl "https://router-api-testnet.integratenetwork.work/v1/async/jobs/<JOB_ID>?provider_address=<PROVIDER_ADDRESS>&model=qwen/qwen-image-edit-2511" \
-H "Authorization: Bearer <YOUR_API_KEY>"TEE Verification
If the provider runs inside a TEE (Trusted Execution Environment), you can request on-chain signature verification by setting verify_tee. The response will include a tee_verified field in the trace.
# Add verify_tee as a query parameter (multipart requests)
curl "https://router-api-testnet.integratenetwork.work/v1/async/images/edits?verify_tee=true" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-F model="qwen/qwen-image-edit-2511" \
-F prompt="Make the sky purple" \
-F image="@input.png"
# Then poll with verify_tee query param
curl "https://router-api-testnet.integratenetwork.work/v1/async/jobs/<JOB_ID>?provider_address=<ADDR>&model=qwen/qwen-image-edit-2511&verify_tee=true" \
-H "Authorization: Bearer <YOUR_API_KEY>"