Skip to main content
Memory Router also serves OpenAI image models such as gpt-image-1. Call them with the OpenAI SDK’s Images API, using the same base URL and API key you use for chat models.

Step 1: Find an image model

Image models are listed in the model catalog together with chat models. They carry kind: image_generation:
The console’s Available Models page lists them too, with their prices. See List Models for the full response.

Step 2: Generate an image

Point the OpenAI SDK at the Memory Router base URL and call images.generate. Each image comes back base64-encoded in data[].b64_json.
To use your own OpenAI key instead, send it as the API key and add the x-memorylake-api-key header, exactly as for chat models. See Deployment Modes.

Parameters

Other parameters are passed to the model unchanged. See Images in the API reference.

Pricing

Image models are priced per token, with separate prices for text and image tokens on input and output. Larger sizes and higher quality produce more image tokens and cost more. The response’s usage field reports the tokens of each call. Prices are on the console’s Available Models page and in price.details.image_generation of List Models. Billing follows the same rules as chat models: see Choosing a Mode.

Good to Know

  • Generation only. Image editing (/images/edits) and variations are not available.
  • No memory. boundary_id applies to Chat Completions, Responses and Messages only. Image requests do not read or write memory.
  • OpenAI base URL only. Image models are called through /openapi/memorylake/router/openai/v1, not the Anthropic base URL.
  • Not in Playground. Image models cannot be selected in the console Playground. Call them through the API.
  • Large responses. A single image can be well over 1 MB of base64. Allow a generous client timeout.
  • Traceable. Every call returns X-Trace-ID and appears in the console Logs. Errors follow the same error contract as other endpoints.

Next Steps

Images API

Every request and response field.

List Models

Find image models and their prices.