Skip to main content
Glama
skelly-77
by skelly-77

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENROUTER_IMAGE_TIMEOUT_SNoSeconds to wait for one generation.600
OPENROUTER_IMAGE_OUTPUT_DIRNoWhere `generate_image` saves, and the fallback when an edit's folder isn't writable. Empty means the default.~/Pictures/OpenRouter Images
OPENROUTER_IMAGE_WORKSPACE_IDNoWorkspace that sign-in creates keys in. An empty string means your personal account.
OPENROUTER_IMAGE_MAX_INPUT_EDGENoInput images are downscaled to this longest edge (pixels) before upload.2048
OPENROUTER_IMAGE_RATIO_TOLERANCENoHow close (3%) a model's aspect ratio must be to the input's for `fit="preserve"` to crop instead of pad.0.03

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
account_statusA

Show whether this computer is signed in to OpenRouter, with the key's spending.

Reports the key label, usage today / this week / this month / in total, and the key's spending limit and remaining credit. If a sign-in is in progress, shows its status and link. Use it after auth_login to confirm sign-in finished, or when the user asks about cost, usage or credits. Takes no parameters.

auth_loginA

Sign in to OpenRouter in the user's browser.

Opens the OpenRouter sign-in page and returns at once with a link. Show the link to the user in case the browser didn't open (it contains no secret). The user finishes in the browser; then call account_status to confirm. The new key is stored in the OS credential store and is never shown. Does nothing if already signed in, unless switch_account is true.

Args: switch_account: true to sign in as a different account or workspace. The current key is kept until the new one is stored.

auth_logoutA

Sign out: delete the stored OpenRouter key from this computer.

The key stays valid on OpenRouter until it is deleted on the keys dashboard; the result links that page. Takes no parameters.

list_image_modelsA

List the image models available on OpenRouter right now, as a markdown table.

Use this before generate_image or edit_image to choose a model and see which options it takes. The catalog is live (cached for 10 minutes), so don't rely on remembered model ids. Columns: id, name, inputs ("text", or "text+image (max N)" input images), aspect ratios, resolutions, quality values, max n per call, seed support, whether the provider moderates prompts (yes/no/?), and a price summary ($/img-unit per image-output unit, $/image, or $/tok per completion token). Call get_image_model for one model's per-provider details.

Args: query: Case-insensitive text to find in the model id or name. accepts_images: true for models that take input images (needed by edit_image); false for text-only models. author: Only this author's models: the part of the id before "/". sort: "newest" (default, newest first) or "price" (cheapest first).

get_image_modelA

Show full details for one image model.

Returns the description, the capabilities, and one section per provider endpoint with its supported parameters and allowed values, the passthrough parameters usable in provider_options, and its pricing line items.

Args: model_id: Exact model id from list_image_models.

generate_imageA

Generate new images from a text prompt with an OpenRouter image model.

Call list_image_models first to choose a model, and get_image_model for its exact allowed values. Options are checked against the model before anything is sent: an invalid value fails with the allowed values and costs nothing.

Each call costs money on the user's OpenRouter account; the result reports the cost. Prompts go to a third-party model provider through OpenRouter: get the user's OK before sending client or project images or details to third-party providers.

Images are saved (never overwriting) to the configured output folder with a JSON sidecar of the settings used. The result lists the saved paths, any notes and failures, the model, provider, time and cost, plus JPEG previews.

Args: prompt: What to create. model: Model id from list_image_models. n: Number of images, 1 to 10. Above the model's max n, the server splits them into several calls (each billed) and says so in the notes. aspect_ratio: One of the model's aspect ratios, e.g. "16:9". resolution: One of the model's resolution tiers. size: Exact pixel size such as "1024x1024", for models that support it. quality: One of the model's quality values. seed: Integer for repeatable results, for models that support it. background: One of the model's background values, e.g. "transparent". output_format: One of the model's output formats, e.g. "png" or "svg". output_dir: Folder to save into instead of the default. Must be an absolute path or start with "~". filename_prefix: File name stem; defaults to a slug of the prompt. provider_options: Provider passthrough options as a flat dict, e.g. {"moderation": "low"}. Keys must be in the model's passthrough parameters (see get_image_model); the server sends each key to every provider that allows it. Any other key is rejected before anything is spent.

edit_imageA

Edit an image (or create one from reference images) with an OpenRouter image model.

Call list_image_models first to choose a model, picking one whose inputs column says "text+image". Options are checked against the model before anything is sent.

The input images are uploaded to a third-party model provider through OpenRouter: get the user's OK before sending client or project images to third-party providers. Each call costs money on the user's OpenRouter account; the result reports the cost.

All paths must be absolute (or start with "~"); relative paths are rejected. Results are saved next to the first input image (never overwriting it) with a JSON sidecar, unless output_dir is given. The result lists the saved paths, notes, failures, model, provider, time and cost, plus JPEG previews.

Args: prompt: The change to make, e.g. "make it dusk with warm window light". model: Model id from list_image_models. images: Absolute paths of the input images. The first is the image being edited; any others are references. mask_path: Optional absolute path of a mask for the first image: white = change, black = keep. The edit is composited locally, so only the white area changes, but there may be a visible lighting seam at the mask edge where new and old pixels meet; a soft mask edge or mask_feather_px helps. Requires fit="preserve". mask_feather_px: Blur radius in pixels for the mask edge; by default it is chosen from the image size. fit: "preserve" (default) returns each result at exactly the first input's pixel size: the server picks the model's closest aspect ratio, then scales and crops back (padding the input first if no ratio is close). With fit="preserve" don't pass aspect_ratio or size. "model" keeps the size the model returns and lets you choose aspect_ratio. n: Number of images, 1 to 10. Above the model's max n, the server splits them into several calls (each billed) and says so in the notes. aspect_ratio: One of the model's aspect ratios (only with fit="model"). resolution: One of the model's resolution tiers. size: Exact pixel size such as "1024x1024" (only with fit="model"). quality: One of the model's quality values. seed: Integer for repeatable results, for models that support it. background: One of the model's background values, e.g. "transparent". output_format: One of the model's output formats, e.g. "png". output_dir: Folder to save into instead of next to the first input. Must be an absolute path or start with "~". filename_prefix: File name stem; defaults to the first input's name. provider_options: Provider passthrough options as a flat dict, e.g. {"moderation": "low"}. Keys must be in the model's passthrough parameters (see get_image_model); the server sends each key to every provider that allows it. Any other key is rejected before anything is spent.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.3/5.0

Scored across 7 tools

Disambiguation5/5

Each tool maps to a clearly distinct action: auth_login/auth_logout are opposite operations, account_status is a read-only check, list_image_models vs get_image_model cleanly separate browsing from detail lookup, and generate_image vs edit_image separate creation from modification. No meaningful overlap exists.

Naming Consistency4/5

Most tools follow a readable verb_noun pattern (list_image_models, get_image_model, generate_image, edit_image, auth_login, auth_logout). Minor deviation: the auth group mixes prefixes ('auth_' for login/logout vs 'account_' for status), but it remains predictable.

Tool Count5/5

Seven tools is well-scoped for an image-generation service: three for auth/session, two for model discovery, two for generation/editing. Every tool earns its place with no redundancy or bloat.

Completeness5/5

The surface covers the full lifecycle: sign in, verify session/spend, sign out, discover models, inspect model details, and both generate and edit images with rich parameter control. No obvious gaps for the stated domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues