OppermindAPI docs
Get an API key

Oppermind Lato 1 API

Oppermind Lato 1 reads text, images and documents, calls the developer's functions and built-in tools, and generates and edits images and video. Each endpoint handles one kind of output: text endpoints return text and tool calls, /images returns images, /videos returns video.

Base URL

Authentication

Models

Model ID Modality Endpoints Billed per
oppermind-lato-1 Text, images and documents in, text out /messages, /chat/completions, /responses Million input, cached input and output tokens, plus built-in tool calls
oppermind-lato-1-vision Image generation /images Image
oppermind-lato-1-video Video generation /videos Second of video

Any "model" value is accepted. Responses always report the Oppermind model id.

Text endpoints

Streaming

POST /api/v1/messages

Request body (Chat Completions format):

JSON
{
  "model": "oppermind-lato-1",
  "max_tokens": 1024,
  "messages": [
    { "role": "system", "content": "Answer briefly." },
    { "role": "user", "content": [
      { "type": "text", "text": "Summarise this report." },
      { "type": "file", "file": { "file_id": "file-0123456789abcdef0123456789abcdef" } }
    ] }
  ]
}

Roles: system, developer, user, assistant, tool. A tool message needs the tool_call_id of an earlier assistant tool call.

Response (Oppermind native):

JSON
{
  "id": "req_...",
  "model": "oppermind-lato-1",
  "type": "message",
  "content": [ { "type": "text", "text": "..." } ],
  "usage": { "input_tokens": 1830, "output_tokens": 256, "cache_read_input_tokens": 0, "cache_creation_input_tokens": 0, "reasoning_tokens": 0 },
  "stop_reason": "end_turn",
  "tool_usage": {},
  "billing": { "charged_aud": "0.001234" }
}

POST /api/v1/chat/completions

Response: { id, object: "chat.completion", created, model, choices: [ { index, message: { role, content, tool_calls?, annotations? }, finish_reason } ], usage: { prompt_tokens, completion_tokens, total_tokens, prompt_tokens_details: { cached_tokens }, completion_tokens_details: { reasoning_tokens } }, tool_usage? (only when built-in tools ran), billing: { charged_aud } } finish_reason: stop | length | tool_calls | content_filter.

POST /api/v1/responses

Request: { model, instructions?, input: string or array of items, tools?, tool_choice?, text?: { format }, max_output_tokens?, reasoning?: { effort }, temperature?, top_p?, prompt_cache_key?, user? } Input items: { role, content } messages (system, developer, user, assistant), { type: "function_call", call_id, name, arguments }, { type: "function_call_output", call_id, output }. Reasoning items are accepted and ignored. Content parts: input_text, input_image { image_url | file_id, detail }, input_file { file_id | file_data, filename }. Response: { id: "resp_...", object: "response", created_at, status: completed | incomplete, incomplete_details?, model, output: [ message with output_text content | function_call ], output_text, usage: { input_tokens, input_tokens_details: { cached_tokens }, output_tokens, output_tokens_details: { reasoning_tokens }, total_tokens }, tool_usage, billing: { charged_aud } } seed and stop are read on /messages and /chat/completions only.

Inputs: images and documents

Files API

Tools

Request options

POST /api/v1/images

Endpoint: POST {base}/images 1 to 4 images per request (n outside that range is clamped), prompt up to 8 KB. Some options may not apply on every model version.

To clean up, retouch, restore or otherwise edit an existing photo, add image (one source) or images (1 to 3 sources). Each source is a base64 data URL, a public HTTPS URL, { "url": "..." }, or { "file_id": "file-..." } from POST /files. JPEG, PNG, WebP and GIF are accepted. The original pixels are sent to image editing; a source is never silently discarded. Existing /api/v1/images/proxy?token=... paths can be reused by their owning account. Inputs are limited to 24 MB combined decoded bytes and 31 MB per JSON request. Unsupported editing configurations return OPMD_CAPABILITY_001 before charging. Some model versions deliver one image per call even if n is higher; billing uses the delivered count.

Photo cleanup request:

JSON
{
  "prompt": "Remove the clutter and correct the lighting, keeping the person unchanged",
  "image": { "file_id": "file-your-upload-id" },
  "n": 1
}

Request body:

JSON
{
  "model": "oppermind-lato-1-vision",
  "prompt": "A futuristic city at dusk",
  "n": 1,
  "aspect_ratio": "16:9",
  "response_format": "url"
}

Response: { "model": "oppermind-lato-1-vision", "data": [ { "url": "/api/v1/images/proxy?token=..." } ], "usage": { "images_generated": 1 } }. Fetch each url with the same bearer key.

POST /api/v1/videos

Endpoint: POST {base}/videos Video generation is synchronous - the response returns the finished video url directly. No polling is required. duration_seconds is 1 to 15 (clamped, default 10). resolution 720p or 1080p (default). Requires a key with full permission.

To animate a photo, add image. To guide a video with subjects from photos, add reference_images (1 to 3 sources). To edit a clip, add video and optionally video_mode: "edit" (the default with video). To continue a clip, use video_mode: "extend"; duration_seconds is the new portion, clamped to 2 to 10 seconds, and only that portion is billed. Use exactly one of image, reference_images or video. Sources use the same URL, base64 data URL or { "file_id": "file-..." } format as /images; uploaded videos must be MP4. Returned /api/v1/videos/proxy?token=... paths can be reused by their owning account. Inputs are limited to 24 MB combined decoded bytes and 31 MB per JSON request. Some model versions edit MP4 clips up to 8.7 seconds, retaining the source duration and aspect ratio at up to 720p. Other versions accept source clips up to 10 seconds and produce video in whole seconds from 3 to 10. The API adapts to the selected version. duration_seconds, resolution and aspect_ratio do not resize or shorten an edit on versions that inherit the source geometry. Limits and accepted options depend on the current model version; rejected requests return an error. Billing and reservations use the duration actually submitted to that version. Media uses the first capable configured provider in the admin primary and fallback slots, with its own key, model and endpoints. If neither slot supports the feature, OPMD_CAPABILITY_001 is returned before charging. For image-to-video and reference-to-video, aspect_ratio may be 16:9, 9:16, 1:1, 4:3, 3:4, 3:2 or 2:3. Generation and editing return the finished video synchronously.

Video editing request:

JSON
{
  "prompt": "Change the jacket to blue, preserving the scene and movement",
  "video": { "file_id": "file-your-upload-id" },
  "video_mode": "edit"
}

Request body:

JSON
{
  "model": "oppermind-lato-1-video",
  "prompt": "Ocean waves at sunset",
  "duration_seconds": 10,
  "resolution": "1080p"
}

Response:

JSON
{
  "id": "req_01abc123",
  "model": "oppermind-lato-1-video",
  "status": "succeeded",
  "url": "{base}/videos/proxy?token=...",
  "duration_seconds": 10,
  "resolution": "1080p"
}

GET /api/v1/videos/{id}

Endpoint: GET {base}/videos/{id} You probably do not need this. Video generation is synchronous, so POST {base}/videos already returns the finished url. This returns a confirmation only, and exists so clients written against a polling-style API do not break.

GET /api/v1/openapi.json

Endpoint: GET {base}/openapi.json The machine-readable OpenAPI 3.1 description of this API - point an SDK generator or Postman at it to scaffold a typed client. Public: no API key needed.

GET /api/v1/changelog

Endpoint: GET {base}/changelog Machine-readable changelog and deprecation policy. Poll this to learn about breaking changes before they reach you. Requires a valid API key.

GET /api/v1/pricing

Endpoint: GET {base}/pricing Current AUD rates: text per million input, cached input and output tokens, tools per built-in tool call, image.per_image, video.per_second_720p / per_second_1080p. image or video is null when that capability is not available. Rates can change, so read them from here instead of hardcoding them.

Error codes

/messages, /images and /videos return { "error": { "type", "code", "message" } }. /chat/completions, /responses and /files return { "error": { "message", "type", "code", "param" } }. Authentication and rate-limit errors use the first shape everywhere. Branch on error.code.

Code HTTP Meaning
OPMD_MODEL_001 400 Invalid request (409 when the request was already processed)
OPMD_MODEL_002 400 More than 2000 messages or input items
OPMD_MODEL_003 413 / 400 Body over 31 MB, or image prompt over 8 KB
OPMD_MODEL_005 400 Streaming is not available for this request
OPMD_CAPABILITY_001 400 The current model version cannot use this tool, option or content type
OPMD_UPSTREAM_400 400 / 413 / 415 / 422 The model rejected the request (for example an unreadable image). Reason in the message. Not charged.
OPMD_EMPTY_001 502 The model returned no answer (for example it ran out of output tokens; the message says which limit ran out). Not charged, unless built-in tools already ran during the request or more than 20 requests in the past hour returned no answer; the error message says when a request was charged.
OPMD_FILE_001 404 No file with that id
OPMD_FILE_002 400 / 409 / 413 / 415 / 422 File empty, too large, unreadable, unsupported file type, or over the account limit
OPMD_FILE_003 422 File did not pass our file safety checks and was not accepted. Not charged
OPMD_AUTH_001 401 Invalid or missing API key
OPMD_AUTH_002 403 Key lacks permission for this endpoint, or account suspended
OPMD_AUTH_003 403 Caller IP not in the key's allowlist
OPMD_BILLING_001 402 Not enough credit
OPMD_BILLING_002 402 Monthly spend limit reached. Requests resume next month, or when the limit is raised or removed
OPMD_POLICY_001 403 Request breaks the usage policy
OPMD_MODERATION_001 403 Image or video prompt blocked by content moderation
OPMD_RATE_001 429 Per-key request limit reached
OPMD_RATE_002 429 Model busy, retry shortly
OPMD_IDEMP_001 400 Malformed Idempotency-Key
OPMD_IDEMP_002 409 Same Idempotency-Key still running
OPMD_PROVIDER_001 503 Capability not available right now
OPMD_GW_001 500 / 502 / 503 Gateway error, retry with backoff
OPMD_GW_002 503 IP allowlist or spend limit check unavailable, retry
OPMD_ROUTE_404 404 Unknown endpoint

Response headers (useful for debugging)

Limits

Webhooks

Pricing

Prepaid credit at Oppermind's AUD rates: per million input tokens, per million cached input tokens, per million output tokens (reasoning tokens count as output), per built-in tool call, per image and per second of video. Rates can change. Current rates are on the developer dashboard Billing page and at GET {base}/pricing. Every text response reports its exact charge in billing.charged_aud. Requests the model rejects are not charged. Replies with no answer (OPMD_EMPTY_001) are not charged unless built-in tools already ran or more than 20 requests in the past hour returned no answer.

Client libraries

Generated from the Oppermind developer dashboard docs. Questions: enquiry@oppermind.com