Media
Generate images
Generate one or more images from a prompt, returned as base64 data.
https://api.numes.ai/api/v1/imagesImages are always returned inline as base64 (b64_json); URL responses are not offered. Controls you set (size, quality, output_format, background, n) are forwarded; add provider.require_parameters: true to route only to endpoints that declare every one of them. With stream: true the response is a stream of image_generation.* events. Your account's request policy applies to prompt; reference images aren't inspected. Guide: Image generation.
Authorization
AuthorizationheaderRequired
Bearer inference key. Charges settle in the key's billing currency. Authorization: Bearer $NUMES_API_KEY
Headers
X-Request-IdstringCorrelation ID, not an idempotency key. Inference request IDs recorded with a generation are unique per account. A traffic-admitted request reusing a recorded ID returns 400 invalid_request. Traffic admission rejection takes precedence over this conflict, including for reused IDs; it performs no generation lookup and writes no generation, result or attempt. Rate-limit rejection returns 429 rate_limited with Retry-After; an inference limiter outage retains 500 server.
Length1–128
Request body
application/jsonThe contract declares a 10 MiB body limit. The size the service enforces is listed in Limits.
Responses
200Image generation resultapplication/jsontext/event-stream
BodyImageResponseapplication/json
text/event-stream
503No eligible provider can serve the request. Unknown, unpublished, currency-mismatched and unauthorized shared model IDs receive the same bounded response (`error.code` 503, `error.metadata.error_type` "provider_unavailable", message "no provider is available"). Inference and encrypted resolution do not classify model existence after routing fails. Earlier validation and authorization errors remain unchanged. An interrupted server execution while the original HTTP caller remains connected also uses 503 provider_unavailable with the fixed message "service temporarily unavailable". Once streaming has started, the error is in-band and the HTTP status remains 200. If an otherwise eligible USD-indexed Bitcoin offer is blocked by an unavailable market reference, or its reference expires before dispatch, the response instead uses 503 with error_type "bitcoin_reference_price_unavailable" and message "Bitcoin pricing is unavailable. Try again shortly."application/json
ErrorCompatible error envelopeapplication/json
Headers