Developer API

Text, image, and video endpoints

Send valid requests and handle normalized Lato responses for every supported modality.

POST /messages

Send one to 100 user or assistant messages, optional system guidance, max_tokens from 1 to 8192, and temperature from 0 to 2. Omit stream or set it to false; streaming is not currently supported and stream:true returns OPMD_MODEL_005.

system and temperature shape the reply; adding stream:true returns 400 OPMD_MODEL_005 instead.
Try this
POST /api/v1/messages {"model": "oppermind-lato-1", "system": "You answer as a courteous hotel concierge.", "max_tokens": 200, "temperature": 0.4, "messages": [{"role": "user", "content": "Recommend a quiet place for breakfast near the harbour."}]}
What you getA 200 reply with the concierge answer in content[0].text; adding "stream": true to the same body returns 400 with error.code OPMD_MODEL_005 instead.

POST /images

Send a prompt and choose count, standard or HD quality, URL or b64_json response format, aspect ratio, and resolution. Current request enforcement caps image count at four.

Two entries, each an authenticated proxy URL you fetch with the same bearer; n is capped at four.
Try this
POST /api/v1/images {"prompt": "minimalist poster for a community bike repair workshop, teal and cream", "n": 2, "quality": "hd", "aspect_ratio": "3:4", "response_format": "url"}
What you getThe data array holds two entries, each with a url you fetch using the same Bearer key; a request with n above 4 is rejected at validation, so keep the count at four or fewer.

POST /videos

Send a prompt, duration up to 60 seconds, 720p or 1080p, and 24, 30, or 60 fps. Generation is synchronous, so allow a generous timeout and use the finished URL in the POST response.

The response waits for the finished video; status is always succeeded and there is nothing to poll.
Try this
POST /api/v1/videos with a client timeout of at least 120 seconds {"prompt": "slow aerial pan over rows of solar panels at sunrise", "duration_seconds": 8, "resolution": "1080p", "fps": 24}
What you getAfter the wait, the 200 body arrives with status succeeded, a url, duration_seconds and resolution; there is no job to poll, and the key must have Full Access.

Fetch protected video output

The returned video URL is an Oppermind proxy path. Fetch it with the same Bearer API key. GET /videos/{id} is a compatibility confirmation—not a polling requirement.

Same bearer, video bytes back; GET /videos/{id} only confirms generation was synchronous.
Try this
curl 'https://oppermind.com/api/v1/videos/proxy?token=…' -H 'Authorization: Bearer opmd_sk_…' -o solar.mp4 using the url value from the POST response.
What you getThe video bytes download to solar.mp4; the same request without the Authorization header is refused, and GET /videos/{id} only returns a note that generation was synchronous.

Use normalized responses

Responses expose Oppermind Lato model identifiers and never reveal upstream provider names. Capture content, usage, request ID, route type, and API version.

Log body.model, body.usage and these headers; an upstream provider name never appears.
Try this
Log these from every response: body.model, body.usage, and the headers X-Request-ID, X-Route-Type and X-API-Version.
What you getYour logs show model values such as oppermind-lato-1 and oppermind-lato-1-video, never an upstream provider name, next to a request ID you can quote to support.
GUIDED LEARNING

Practise this in Oppermind Academy

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

Open learning path