Issue an API key with a scope

For the signed-in owner, in a browser session (an API key is refused with 401). A connector (MCP/OAuth) token is refused on every account-management door with 403 browser_session_required: a connector does MCP work, it does not manage keys. The response carries the whole key once; it is not stored and cannot be shown again. scope decides what the key may do (see the APIKey schema). A request that names no scope gets a full key, as every key did before scopes could be chosen; an unknown scope is refused and nothing is issued. The resolved account may be selected with X-Rendry-Account; only an owner or admin browser session may administer its keys. The mode and actor are reported in each reply.

post/user/api-keys

Request

  • Base URL: https://rendry.io/api/v1
  • URL: https://rendry.io/api/v1/user/api-keys
  • Auth: HTTP bearer

Headers

X-End-Userstring

Analytics correlation only; never authorizes files or accounts. One safe ASCII value up to 64 bytes. Invalid values return 400. Persisted embedded subject takes precedence. Allowed by CORS.

X-Rendry-Accountstring

Browser/OAuth current member account selector. API keys/embed credentials are bound to their persisted account and reject another account. Omitting this header selects the browser actor personal account.

Request body

namestring required

Seen only by the owner, to tell keys apart when revoking. Stored without leading and trailing whitespace; one of whitespace alone is refused.

scope'read' | 'render' | 'full'
mode'live' | 'test'

Immutable execution mode, persisted on the issued key. Test rendering is watermarked and does not debit credits.

actor_idstring

Current member who owns this credential; defaults to the issuing browser actor. Member removal invalidates their keys.

Response

Issued. An APIKey whose key_value is the whole key.

idstring
namestring
key_valuestring

The whole key (sk_live_... or sk_test_...) in the create response, and ONLY there — it is not stored. The list shows the first 12 characters followed by ***.

scope'read' | 'render' | 'full'

What the key may do. read: list and read templates, presets, documents, usage, and price a batch (POST /batch-tasks/preview parses the table and quotes the run, rendering and charging nothing) — no rendering, no changes. render: everything read may, plus render_image, render_batch, render_document and preview_preset (they spend credits) — no template edits or deletions. full: everything, including creating, editing, sharing and deleting templates and files.

created_atstring
mode'live' | 'test'
actor_idstring
issued_by_actor_idstring

Changes

No recorded changes to this operation across all 1 revision of this API.