Developer API

API keys and authentication

Create, scope, store, rotate, and revoke Developer API keys safely.

Create a named key

Open the Developer console and create a key for one environment or service. Keys begin with opmd_sk_ and are shown only once, so copy them directly into an approved secret manager.

Name the key for the system that will hold it; the full key is shown once.
Try this
Open the Developer console from Settings, Developer API, Open developer console. Under Create New API Key enter the name orders-service-prod, choose Text Only, and click Generate API Key.
What you getThe new key beginning opmd_sk_ is displayed once; you paste it straight into your secret manager, because afterwards the console shows only the key's name and status.

Choose the smallest permission

Available key permissions include full access, text only, image generation, and read only. Video generation requires full permission. Do not give a service capabilities it never calls.

Pick the smallest permission the integration needs.
Try this
From a test script, call POST /api/v1/images with a Text Only key: {"prompt": "flat-lay photo of our new stationery range"}
What you getThe call is refused with 403 and error.code OPMD_AUTH_002 because the key lacks image permission; an Image Generation key succeeds, and video needs Full Access.

Keep the key server-side

Store the key in a backend secret or environment variable. Your application should authenticate its own users, authorize the requested action, and call Oppermind from the server.

Only your server sends this request; the browser never sees $OPPERMIND_API_KEY.
Try this
Add a route in your own backend, for example POST /api/summarise, that checks the caller's session, validates the input, then calls https://oppermind.com/api/v1/messages with the key read from process.env.OPPERMIND_API_KEY.
What you getThe browser only ever talks to your route; the opmd_sk_ key never appears in network requests from the page, so a leaked front-end bundle exposes nothing.

Limit and rotate

Use separate keys for development, staging, and production. Apply per-key rate controls and an IP allowlist where appropriate. Revoke a leaked or retired key immediately.

Outside the allowlist the prod key is refused with OPMD_AUTH_003; a revoked key returns 401 instead.
Try this
Create separate keys named app-dev, app-staging and app-prod, add only your production egress range to the IP allowlist in the console, and when a key leaks open its entry and click Delete Key.
What you getCalls from an address outside the allowlist return 403 with error.code OPMD_AUTH_003; the deleted key's entry shows Revoked and every request using it is refused immediately.
GUIDED LEARNING

Practise this in Oppermind Academy

Follow the related tutorial or course and apply the concept to a real task.

Open learning path