Learning resourcesReviewed · OpenRouter

OpenRouter Python Presets Reference

OpenRouter's Python Presets reference helps Python developers manage saved AI request settings, but creation requires a management key and silently ignores fields outside the preset configuration. It documents creation from three request formats, retrieval, version inspection, archiving and restoration.

Researched 24 Nov 2026

In short.

OpenRouter's Python Presets reference is API documentation for developers managing saved AI settings, but accepted request fields are not necessarily saved. Creation, archiving and restoration require read-write management keys rather than inference API keys. The page explains pagination, version retrieval and reversible archiving, while leaving the complete saved configuration schema, inference usage, installation requirements and prices unspecified. Runtime behavior has not been assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Covers the complete page at [https://openrouter.ai/docs/client-sdks/python/sdks/presets/README.md], including all nine operations, examples, parameter tables, response links and error tables. Linked documentation, response schemas, installation materials and package files are excluded. No licensing or redistribution notice is supplied on the page. No code or API requests were executed; inference integration, saved-field behavior, reliability and performance remain untested.

The overview

identity

This is the Presets endpoint reference for OpenRouter's Python SDK at [https://openrouter.ai/docs/client-sdks/python/sdks/presets/README.md]. Examples import OpenRouter from openrouter and access operations through open_router.presets.

The resource documents an API feature for saving request configuration. It is not a collection of ready-made prompts or models.

assessment

Useful for developers who already work with OpenRouter and need precise preset operation names, parameters, permissions and lifecycle rules. The distinction between archiving and permanent deletion is particularly consequential for application maintenance.

It is an implementation reference rather than a complete introductory tutorial. Installation instructions, full response schemas and an example of using a saved preset for inference are absent.

users

Likely users include Python application developers managing AI request settings and engineers maintaining configurations across OpenRouter workspaces. This fit follows from the documented workspace controls and version operations.

Beginners will need familiarity with Python function calls, environment variables, API authentication and pagination. Experienced developers should focus on permission boundaries, silently discarded fields and designated-version behavior.

capabilities

The nine documented operations cover listing presets, retrieving one, creating from chat-completions, messages or responses request bodies, archiving, restoring, listing versions and retrieving a specific version.

Preset listings put the most recently updated first. Version listings run from oldest to newest. Both listing methods accept offset and limit, with a maximum limit of 100; examples advance through pages using res.next().

Using it

requirements

Examples require the Python OpenRouter client and an API credential, read from OPENROUTER_API_KEY. The page does not specify a Python version, SDK release or installation command.

Creation, delete and restore explicitly require a read-write management key and reject inference API keys. Accepted key types and permission levels for read operations are not specified. Operations addressing a preset require its URL-safe slug.

mechanism

Creation converts an inference request body into a preset, creating either a new preset or a new version of an existing one. Only fields overlapping the preset configuration are persisted; messages, stream and prompt are explicitly identified as ignored examples.

get returns the preset with its currently designated version included. get_version retrieves a version by slug and version number. delete archives the preset, hides it from get and list, and stops it resolving for inference, while retaining its versions and reserving its slug.

restore reactivates an archived preset without creating a version or changing the designated version. Repeated archiving succeeds, and restoring an active preset returns it unchanged.

setup

In an environment with the documented client available, initialize OpenRouter with the appropriate credential and choose a preset slug. For write operations, the credential supplied through the example's OPENROUTER_API_KEY variable must be a read-write management key. The application URL, title and category metadata shown in examples are optional.

Choose workspace_id explicitly when workspace targeting matters. Otherwise, the documented default is the key's workspace when limited to one workspace, or the account's default workspace.

example

A developer could adapt the documented create_presets_chat_completions example to create my-preset using a messages list, a model and temperature 0.7, then inspect the saved preset through get(slug="my-preset"). No resulting response or saved configuration is shown.

Although messages is required by this creation method, the endpoint description says messages are ignored when saving the preset. Supplying a conversation therefore does not establish that the conversation is stored. The messages-format creation method also requires model, while the responses-format method lists input and model as optional.

Assessment & evidence

limitations

The complete set of persisted configuration fields is not enumerated. A parameter appearing in a creation method's signature does not prove that it is saved, and some inference parameters explicitly depend on provider support.

Archiving does not release the slug. Disabled presets return 409 for delete and restore. The page lists version retrieval but no operation for designating an older version as current, so a rollback workflow is not established.

Response types are linked rather than defined inline. Error tables identify possible failures, but practical reliability, performance and error recovery have not been assessed.

reasoning

The documented combination of saved settings and separately retrievable versions suggests a useful fit for applications that need managed configuration history. That is a use-case inference from the API design, not a demonstrated deployment outcome.

The central adoption question is whether the settings an application needs actually survive preset creation. Restoration addresses archival state; it does not, by itself, provide version rollback.

alternatives

Within this reference, the three creation methods offer request-format alternatives: chat-completions, messages and responses. Developers can choose the method matching their application's request structure while accounting for each method's required arguments.

Keeping settings in application configuration is a possible design alternative, but this page provides no comparison with that approach or competing services. Relative costs, portability and operational trade-offs are not assessed.

evidence

The source is the complete OpenRouter Python Presets reference at [https://openrouter.ai/docs/client-sdks/python/sdks/presets/README.md]. It contains operation descriptions, Python examples, parameter tables, response-type links and error tables.

These support conclusions about documented behavior. They contain no execution receipts, benchmarks or observed API responses. Linked authentication guides and schemas are outside the available source.

Access & freshness

costs

The page gives no prices for preset operations, storage, version retention or subsequent model inference. Total operating cost and any separate preset-management fee are unknown.

Some request parameters mention billing behavior or dollar-denominated stopping conditions, but these do not establish preset pricing or an application budget.

rights

The page supplies no documentation or SDK license, redistribution permission, or applicable service and model terms. Commercial-use conditions and permission to redistribute the documentation cannot be determined from this page.

Management-key requirements describe API authorization; they do not establish licensing or content-use rights.

freshness

The documentation capture is dated 24 November 2026 at 01:06 UTC. The page does not state its publication date, last update or SDK release number, so compatibility with a particular installed release is unknown.

No deprecation notice for Presets appears. The explicit deprecation note concerns the chat-completions max_tokens argument, for which the table recommends max_completion_tokens.

actions

Before adoption, confirm SDK compatibility, obtain the appropriate management credential and choose the intended workspace. Establish which required settings are supported by the preset configuration, then inspect the configuration returned after creation to detect silently ignored fields.

Confirm how inference requests reference a preset and how designated versions are changed; neither workflow is demonstrated here. Obtain current pricing and applicable usage terms, and account for archived slugs remaining reserved.

Evidence for this report

selected-page.txtselected · checked 2026-11-24