✦ Course · Beginner

Oppermind Developer API quickstart

Create a scoped API key, make your first Lato text request, read usage metadata, and handle failures safely from a backend.

7 lessons45 min Self-pacedUpdated 30 Sept 2026
Start course

YOUR OUTCOME

You will make a secure server-side API call and turn the response into a reliable application path.

Keep keys on the server Use the versioned v1 contract Build for retries, limits, and stable errors
01

Understand the API contract

Use the stable https://oppermind.com/api/v1 base, public Lato model identifiers, and modality-specific endpoints.

5 min
02

Create a least-privilege key

Create an opmd_sk_ key in the Developer console, choose only the permissions needed, copy it once, and store it in a server secret.

6 min
03

Send your first text request

POST messages to /api/v1/messages with oppermind-lato-1, a bounded max_tokens value, and stream set to false or omitted.

8 min
04

Read the response and usage

Extract text content, capture the request ID, inspect normalized model metadata, and record input and output token usage.

6 min
05

Generate an image

POST a prompt to /api/v1/images and choose a URL or base64 response according to your storage and delivery path.

6 min
06

Generate a video

POST to /api/v1/videos with a generous client timeout; generation is synchronous and returns the finished authenticated proxy URL.

7 min
07

Handle the unhappy paths

Use idempotency keys, RateLimit headers, stable error codes, safe retries, billing checks, and structured logging.

7 min

What each lesson covers

The course, lesson by lesson.

01

Understand the API contract

Use the stable https://oppermind.com/api/v1 base, public Lato model identifiers, and modality-specific endpoints.

Point your client at https://oppermind.com/api/v1 and note the three endpoints you will use: POST /messages for text, POST /images for images and POST /videos for video. Send the model id oppermind-lato-1 on every text request.

02

Create a least-privilege key

Create an opmd_sk_ key in the Developer console, choose only the permissions needed, copy it once, and store it in a server secret.

In the Developer console, create a key named support-summariser-prod, choose the text only permission, copy the opmd_sk_… value once and store it in your server's secret manager. Never paste it into browser or mobile code.

03

Send your first text request

POST messages to /api/v1/messages with oppermind-lato-1, a bounded max_tokens value, and stream set to false or omitted.

curl https://oppermind.com/api/v1/messages \ -H 'Authorization: Bearer opmd_sk_…' \ -H 'Content-Type: application/json' \ -d '{"model":"oppermind-lato-1","max_tokens":200,"messages":[{"role":"user","content":"Summarise our 30-day returns policy in two sentences for a product page."}]}'

04

Read the response and usage

Extract text content, capture the request ID, inspect normalized model metadata, and record input and output token usage.

From that response, log in your server: content[0].text, the id, the model value, usage.input_tokens and usage.output_tokens, plus the X-Request-ID and X-API-Version response headers.

05

Generate an image

POST a prompt to /api/v1/images and choose a URL or base64 response according to your storage and delivery path.

POST https://oppermind.com/api/v1/images with the body {"prompt":"Flat-lay photo of a linen tote bag on a timber bench in soft morning light","n":1,"quality":"hd","aspect_ratio":"1:1","response_format":"url"} Use b64_json instead when you store the bytes yourself rather than fetching a URL.

06

Generate a video

POST to /api/v1/videos with a generous client timeout; generation is synchronous and returns the finished authenticated proxy URL.

POST https://oppermind.com/api/v1/videos with a client timeout of several minutes and the body {"prompt":"Slow aerial pan over rows of solar panels at sunrise","duration_seconds":10,"resolution":"1080p","fps":24}

07

Handle the unhappy paths

Use idempotency keys, RateLimit headers, stable error codes, safe retries, billing checks, and structured logging.

Send the same POST /messages twice with the header Idempotency-Key: order-4471-summary-v1, and in your handler branch on error.code: back off with jitter on OPMD_RATE_001 after reading the RateLimit headers, stop and alert on OPMD_BILLING_001, never retry a 400 unchanged, and log X-Request-ID on every response.

Keep going

Engineering learning path Developer API overview docs API keys and authentication docs Text, image, and video endpoints docs

Make the learning stick

Start with one real piece of work.

Open Oppermind beside the lesson, apply each step, and leave with something you can use.

Open the quickstart docs