mMengbi Router

API / IMAGES

GPT Image 2 API calls

Use the OpenAI Images-compatible endpoint for image generation and edits.

!

This page is the preview integration contract for individual Mengbi Router users. Examples will remain compatible when the production gateway opens.

01 /

Generate images

Send generation requests through the OpenAI Images-compatible endpoint.

POST /v1/images/generations

Replace model with an image-capable model ID from the catalog.

bash
curl https://router-api.mengbi-ai.net/v1/images/generations \
  -H "Authorization: Bearer sk-mengbi-xxxxxx" \
  -H "content-type: application/json" \
  -d '{"model":"gpt-image-2-1k","prompt":"A minimal mountain poster","size":"1024x1024"}'
02 /

Edit images

The edit endpoint expects multipart/form-data for the image and prompt.

POST /v1/images/edits

Avoid converting binary files into unnecessarily large JSON payloads.

bash
curl https://router-api.mengbi-ai.net/v1/images/edits \
  -H "Authorization: Bearer sk-mengbi-xxxxxx" \
  -F "model=gpt-image-2-1k" \
  -F "[email protected]" \
  -F "prompt=Remove the background"

Sizes and pricing

Available sizes and pricing come from the published model catalog. Confirm support before generating.