Skip to main content
POST
/
v1
/
chat
/
completions
flux-kontext-pro (text to image)
curl --request POST \
  --url https://api.example.com/v1/chat/completions
Flux’s openai format for the text to image API.
curl -X POST "https://gptproto.com/v1/chat/completions" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "stream": false,
  "model": "flux-kontext-pro",
  "messages": [
    {
      "role": "user",
      "content": "Draw me a blue cat"
    }
  ]
}'
{
  "error": {
    "message": "Invalid signature",
    "type": "401"
  }
}

Parameters

ParameterTypeRequiredDefaultDescription
modelstring✅ Yesflux-kontext-proThe model to use for the request. flux-kontext-pro
messagesarray✅ Yes-Array of message objects for the conversation * role:user,The role of the message. * role:assistant,The role of the message. * role:system,The role of the message.
contentarray✅ Yes-text , image_url
textstring✅ Yes-* type:text,The positive prompt for the generation. * type:image_url,Optional image reference that guides generation.
image_urlobject✅ Yes-* type:image_url,The URL of the image to use for the generation.
streamboolean❌ NotrueWhether to stream the response