curl -X POST https://api.blackbox.ai/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "model": "blackboxai/black-forest-labs/flux-pro", "messages": [ { "role": "user", "content": "tesla car" } ] }'
{ "id":"chatcmpl-1757147957", "created":1757147957, "model":"black-forest-labs/flux-pro:1e237aa703bf3a8ab480d5b595563128807af649c50afc0b4f22a9174e90d1d6", "object":"chat.completion", "system_fingerprint":"None", "choices":[ { "finish_reason":"stop", "index":0, "message":{ "content":"https://replicate.delivery/xezq/ZDBFJ3anae13UKSmAsDC9eUV1zzDI4XY3dehqUBmUl1rp0kqA/tmpo0625f2a.webp", "role":"assistant", "tool_calls":"None", "function_call":"None" } } ], "usage":{ "completion_tokens":0, "prompt_tokens":0, "total_tokens":0, "completion_tokens_details":"None", "prompt_tokens_details":"None" } }
Generate images from text. Find your API Key.
response.choices.message.content
Bearer <api_key>
Show Message Object
system
user
assistant
tool