The OpenRouter PHP SDK ships with a bundledDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/phpaisdk/openrouter/llms.txt
Use this file to discover all available pages before exploring further.
resources/models.json catalog containing 370+ models from dozens of provider labs. This catalog is loaded at runtime to resolve capability metadata — such as whether a model supports streaming, reasoning, or tool calling — without requiring a separate API call. When you call OpenRouter::model() or OpenRouter::image(), the SDK consults this catalog automatically to answer supports() and capabilities() queries.
Model ID format
All model IDs follow theprovider/model-name convention used by the OpenRouter platform. The provider segment is the lab’s slug, and the model name identifies the specific version or variant. Some examples:
| Model ID | Lab |
|---|---|
openai/gpt-4o | OpenAI |
anthropic/claude-sonnet-4 | Anthropic |
google/gemini-3.1-flash-lite-image | |
x-ai/grok-4.3 | xAI |
recraft/recraft-v4.1-vector | Recraft |
~ (e.g. ~anthropic/claude-sonnet-latest) are also present in the catalog and resolve to the latest stable version of a given model family.
Text models
UseOpenRouter::model('provider/name') to obtain a TextModelInterface instance backed by a specific model. The instance is backed by OpenRouterTextModel and routes requests through the /api/v1/chat/completions endpoint.
Generate::text() or any other generation call.
Image models
UseOpenRouter::image('provider/name') to obtain an ImageModelInterface instance backed by OpenRouterImageModel. Image generation requests are routed through the /api/v1/images endpoint.
image_generation in their capability list inside the bundled catalog.
Unknown models
If you pass a model ID that is not present in the bundled catalog, the SDK applies a safe fallback: text generation is assumed supported. Internally, whencapabilities() returns an empty array for the requested ID, OpenRouterTextModel::capability() returns CapabilitySupport::supported($capability, 'unknown-model-fallback') for Capability::TextGeneration. All other capabilities return unsupported for unknown models, so feature checks like $model->supports(Capability::Streaming) will return false unless the model is in the catalog.
The bundled catalog reflects the models available at the time the SDK was released and may not include newly-launched models. For the complete, up-to-date list of models supported by the OpenRouter platform, visit openrouter.ai/models.