curl --location --request POST 'https://llm-api.mmchat.xyz/v1/images/generations' \
--header 'Authorization: Bearer METACHAT_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-image-1",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}'
{
"created": 1589478378,
"data": [
{
"b64_json": "..."
}
],
"usage": {
"total_tokens": 100,
"input_tokens": 50,
"output_tokens": 50,
"input_tokens_details": {
"text_tokens": 10,
"image_tokens": 40
}
}
}