Input image support
Use hosted image URLs in the JSON image field. Local files, multipart uploads, and base64 image data are not supported.
Use one API to transform reference images, create product variants, run style changes, and build editing features with supported Gemini and GPT image models.
Image editing request
Send an input image plus prompt instructions to an editing-capable model.
curl https://api.pixapi.ai/v1/images/edits \
-H "Authorization: Bearer $PIXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3-pro-image-preview",
"image": "https://cdn.example.com/product.png",
"prompt": "Place the product in a clean studio scene",
"n": 1,
"size": "1:1"
}'Pixapi image editing uses POST /v1/images/edits for synchronous edits and POST /v1/async/images/edits when the edit should run as a task.
Editing requests keep the API key on the server and send JSON fields such as model, image URL, prompt, n, and size to an editing-capable image model.
Use the endpoint for background replacement, product image variants, reference-guided edits, and upload flows where the app must track request ids and credit usage.
Editing workloads need stricter request validation, asset handling, retries, and billing clarity than one-off image demos.
Use hosted image URLs in the JSON image field. Local files, multipart uploads, and base64 image data are not supported.
Build workflows for product photography, background changes, style transfer, and creative variants.
Use the same billing model for generation and editing so product teams can forecast visual AI costs.
Track request ids and model ids so support can investigate failed or rejected edits.
Compare Gemini and GPT image routes while keeping the surrounding API contract familiar.
Keep user-upload handling and Pixapi keys on the server side instead of exposing provider credentials.
| Workflow | Pixapi model route | Implementation note |
|---|---|---|
| Background replacement | Gemini image editing | Send source image plus a concise scene prompt. |
| Product variants | Gemini or GPT image route | Store the request id and selected model for auditability. |
| Creative resizing | Image generation or edit route | Choose aspect ratio and output count based on channel. |
| User-upload editing | Backend-only Pixapi call | Validate files and keep API keys out of browser code. |
Review endpoints, authentication, request fields, and response formats.
Create and protect a bearer API key before making production calls.
Compare available image and video models by capability and cost.
Check credit packs, billing rules, and current product pricing.
Yes. Supported image models can receive an input image and prompt instructions through the image editing endpoint.
Editing consumes credits according to the selected model and output settings. Check the live model and pricing pages for current costs.
Supported routes can return multiple outputs. Use the output count parameter documented for the selected model.
Handle uploads on your own backend or trusted storage layer, then pass validated hosted image URLs to Pixapi.
Use one Pixapi key for reference-based editing, text-to-image generation, and future visual model routes.
Create API key