body: '{"model":"gpt-image-1","prompt":"a red cat","size":"1024x1024"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
curl--requestPOST\
--urlhttps://api.mixen.ai/v1/images/price\
--header'Authorization: Bearer <token>'\
--header'Content-Type: application/json'\
--data'{ "model": "gpt-image-1", "prompt": "a red cat", "size": "1024x1024" }'
Price of POST /images/generations for the same body, without generating or charging. Computed with the same formula as the actual charge (per image × n).