PixMind Docs
API ReferenceImage ModelsFLUX.1 Kontext Pro

FLUX.1 Kontext Pro Image Generation

Generate and edit context-aware images with FLUX.1 Kontext Pro.

Context-aware image generation and editing that preserves subjects and visual style across changes.

Provider

Black Forest Labs

Model ID

flux-kontext-pro

Endpoint

POST /api-platform/v1/generations

Model notes

  • For editing, include at least one referenceImages URL.

Request parameters

ParameterTypeRequiredDescription
modelstringYes

Stable PixMind model ID. Use `flux-kontext-pro`.

Allowed values: flux-kontext-pro

promptstringYes

Natural-language generation or editing instructions.

aspectRatiostringNo

Requested output aspect ratio.

Allowed values: 1:1, 16:9, 4:3, 9:16, 3:4, 3:2, 2:3, 21:9

Default: 1:1

referenceImagesstring[] (URI)No

Reference image URLs used for editing, composition, subject, or style guidance.

Request example

cURL
curl https://aihub-admin.aimix.pro/api-platform/v1/generations \
  -H "Authorization: Bearer $PIXMIND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "flux-kontext-pro",
  "prompt": "Replace the background with a warm modern kitchen while keeping the product unchanged",
  "aspectRatio": "4:3",
  "referenceImages": [
    "https://example.com/source.jpg"
  ]
}'
JavaScript
const response = await fetch("https://aihub-admin.aimix.pro/api-platform/v1/generations", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.PIXMIND_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "model": "flux-kontext-pro",
  "prompt": "Replace the background with a warm modern kitchen while keeping the product unchanged",
  "aspectRatio": "4:3",
  "referenceImages": [
    "https://example.com/source.jpg"
  ]
})
});

const task = await response.json();

Accepted task response

Generation is asynchronous. Save taskId and poll GET /api-platform/v1/tasks/{taskId} until status is ready or failed.

200 OK
{
  "code": 1000,
  "data": {
    "id": "img_44160",
    "taskId": 44160,
    "type": "image",
    "model": "flux-kontext-pro",
    "status": "processing"
  }
}

API pricing

ConfigurationPrice
API price not published

API pricing uses the apiPlatform role and is separate from PixMind Studio credits. The accepted task response is the final pricing snapshot.