ModelsTutorial
Image generation
Generate images through the image endpoints.
By the end: You can produce an image and find its billable unit.
Image models are billed per generated image rather than per token.
Generate
curl https://www.ary4n73.com/v1/images/generations \
-H "Authorization: Bearer $ROUTEFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"a red apple on a wooden table","n":1,"size":"1024x1024"}'What you are charged
Each model has a published price per image. The number of images is read from the n parameter, and the response is not charged if the request fails.
Image and video models are not reachable through the chat route. Use the media endpoints shown here.