Understand the API contract
Use the stable https://oppermind.com/api/v1 base, public Lato model identifiers, and modality-specific endpoints.
✦ Course · Beginner
Create a scoped API key, make your first Lato text request, read usage metadata, and handle failures safely from a backend.
Start courseYOUR OUTCOME
Use the stable https://oppermind.com/api/v1 base, public Lato model identifiers, and modality-specific endpoints.
Create an opmd_sk_ key in the Developer console, choose only the permissions needed, copy it once, and store it in a server secret.
POST messages to /api/v1/messages with oppermind-lato-1, a bounded max_tokens value, and stream set to false or omitted.
Extract text content, capture the request ID, inspect normalized model metadata, and record input and output token usage.
POST a prompt to /api/v1/images and choose a URL or base64 response according to your storage and delivery path.
POST to /api/v1/videos with a generous client timeout; generation is synchronous and returns the finished authenticated proxy URL.
Use idempotency keys, RateLimit headers, stable error codes, safe retries, billing checks, and structured logging.
What each lesson covers
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.
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.
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."}]}'
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.
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.
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}
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
Make the learning stick
Open Oppermind beside the lesson, apply each step, and leave with something you can use.