size:(16:9、4:3、3:2、1:1、2:3、3:4、9:16).If not specified, the default value is 1:1. n:The default value of n is 1, which can be omitted. If multiple numbers are required, the maximum value is 4.
{"prompt":"cat with a red hat https://xxx.png","model":"flux-kontext-pro","size":"16:9","n":1}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://gptproto.com/v1/images/generations' \
--header'Authorization: sk-*****' \
--header'Content-Type: application/json' \
--data-raw'{
"prompt": "cat with a red hat https://xxx.png",
"model": "flux-kontext-pro",
"size": "16:9",
"n":1
}'
Responses
🟢200Success
application/json
Body
Example
{"created":1751972704,"data":[{"revised_prompt":"cat with a red hat","url":"https://delivery-eu1.bfl.ai/results/14/7028320d8a6223/0d8a622345454eaeb6f4268ab3197208/sample.png?se=2025-07-08T11%3A15%3A03Z&sp=r&sv=2024-11-04&sr=b&rsct=image/png&sig=KVGUHRkBW2KJ0OxMoBgOHbjTNLE/DDWrdJ27oxG/Cuw%3D"}]}