BUILD WITH GIZMO

The API, explained.

Text, images, saved agents, and live voice. One account. Start with a request, choose your route, and follow every charge in your workspace.

REST APIStreaming textAsync imagesAgents by IDGPT-Live-1Cloudflare gateway

Quickstart

Use https://api.gizmoplatforms.com/api/v1 as your API base. With the edge deployment enabled, requests go directly to Cloudflare Workers. The Worker validates your key and allowance, routes inference through AI Gateway, and records receipts in a durable queue. The website server is outside this request path. Provider generation time still varies by model and mode.

  1. Create an account or log in at gizmoplatforms.com. Sign up (free, no card needed; choose API as your starting point) or log in if you already have an account. Both land in your developer workspace.
  2. Create a key. In Developers → API keys, name your key and copy the secret when it appears; it is shown once. The setup guide there also lets you add a card and credits so paid models work.
  3. Choose a model. Call GET /api/v1/models and replace YOUR_MODEL_ID below with an exact returned ID.
  4. Send your first request. Set GIZMO_API_KEY in your server environment. Paid models require enough available usage or balance for a temporary reservation.
routing (optional)
cURL · text completion
curl https://api.gizmoplatforms.com/api/v1/responses \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "YOUR_MODEL_ID",
  "input": "Write a one-sentence bedtime story about a unicorn."
}'

Using an OpenAI SDK? Set its base URL to https://api.gizmoplatforms.com/api/v1 and use your Gizmo key: responses.create and chat.completions.create both work for text. Fields not documented below return 400.

Try a request in the API playground →

Authentication

Send Authorization: Bearer YOUR_GIZMO_API_KEY on every API request, including model discovery and image polling. API keys are separate from your website login session.

Request headers
Authorization: Bearer $GIZMO_API_KEY
Content-Type: application/json

Secrets are shown once and stored as hashes. Keep keys on your server, give each integration a recognizable name, and revoke unused keys in your workspace. All keys on an account share that account’s balance and limits. Do not embed keys in public websites or mobile app bundles.

Model discovery

GET/api/v1/models

Returns currently available text model IDs as an object: "list" response with a data array. Each model includes id, object, and owned_by. Use the exact ID in chat requests.

GET/api/v1/images/models

Returns image adapters with their supported controls and estimates. Text and image catalogs are separate. Check the catalog before choosing an aspect ratio, resolution, quality, or output format.

Discover text models
curl https://api.gizmoplatforms.com/api/v1/models \
  -H "Authorization: Bearer $GIZMO_API_KEY"
Explore model profiles →

Responses (new, recommended)

POST/api/v1/responses

The recommended way to generate text: send a model and an input (a string, or a list of messages for a conversation) and read the reply from output_text. It follows OpenAI's Responses API, so an OpenAI SDK pointed at Gizmo works unchanged. Chat Completions keeps working too.

FieldAccepted values
modelRequired exact model ID.
inputRequired. A string, or 1–200 messages, each with role (user, assistant, system or developer) and text content: a string or input_text parts.
instructionsOptional. System instructions, applied before the input.
routingOptional: fastest (the default when left out) or cheapest. See Routing & discounts.
streamBoolean; false by default.
max_output_tokensOptional integer from 1 to 32,768; default 4,096. Reasoning models count their thinking toward it. Provider limits may be lower.
reasoningOptional, for example {"effort": "low"}. effort is none, minimal, low, medium, high or xhigh: how much a reasoning model thinks before it answers; lower is faster and cheaper, and none skips it where the model allows. Add summary (auto, concise or detailed) to get the model's reasoning text back as a reasoning item; without it, only the answer is returned. Models that do not reason ignore it.
temperatureNumber from 0 to 2; model support varies.
top_pNumber from 0 to 1; model support varies.
storeAccepted for compatibility. Gizmo does not keep responses, so send the whole conversation in input (previous_response_id is not supported).

Responses and Chat Completions

Both endpoints use the same models, keys, routing and prices. Chat Completions takes messages and returns choices; Responses takes input and returns output items plus output_text. Keep whichever your code already uses; for new code, use Responses.

routing (optional)
Chat Completions · request
curl https://api.gizmoplatforms.com/api/v1/chat/completions \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-6-astra",
  "messages": [
    {
      "role": "user",
      "content": "Write a one-sentence bedtime story about a unicorn."
    }
  ]
}'
routing (optional)
Responses · request
curl https://api.gizmoplatforms.com/api/v1/responses \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-6-astra",
  "input": "Write a one-sentence bedtime story about a unicorn."
}'
Chat Completions · response
{
  "id": "gen-1792087946-gJSAGN1DUQK0VBTR57of",
  "object": "chat.completion",
  "created": 1792087946,
  "model": "openai/gpt-6-astra",
  "provider": "OpenAI",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Under a blanket of starlight, a sleepy unicorn tiptoed through moonlit meadows, gathering dreams like dew to tuck beneath its silver mane until morning."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 31,
    "total_tokens": 49,
    "cost": 0.00163
  },
  "gizmo_routing": {
    "requested": "fastest",
    "route": "direct",
    "provider": "OpenAI",
    "fallback": false,
    "attempts": [
      {
        "route": "direct",
        "provider": "OpenAI",
        "status": 200,
        "ok": true,
        "ms": 912
      }
    ]
  }
}
Responses · response
{
  "id": "resp_1792087946gJSAGN1DUQK0VBTR57of",
  "object": "response",
  "created_at": 1792087946,
  "status": "completed",
  "incomplete_details": null,
  "model": "openai/gpt-6-astra",
  "provider": "OpenAI",
  "output": [
    {
      "id": "msg_1792087946gJSAGN1DUQK0VBTR57of",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "Under a blanket of starlight, a sleepy unicorn tiptoed through moonlit meadows, gathering dreams like dew to tuck beneath its silver mane until morning.",
          "annotations": []
        }
      ]
    }
  ],
  "output_text": "Under a blanket of starlight, a sleepy unicorn tiptoed through moonlit meadows, gathering dreams like dew to tuck beneath its silver mane until morning.",
  "usage": {
    "input_tokens": 18,
    "input_tokens_details": {
      "cached_tokens": 0,
      "cache_write_tokens": 0
    },
    "output_tokens": 31,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 49,
    "cost": 0.00163
  },
  "gizmo_routing": {
    "requested": "fastest",
    "route": "direct",
    "provider": "OpenAI",
    "fallback": false,
    "attempts": [
      {
        "route": "direct",
        "provider": "OpenAI",
        "status": 200,
        "ok": true,
        "ms": 912
      }
    ]
  },
  …
}

A reply cut short by max_output_tokens comes back with status: "incomplete" and incomplete_details. Gizmo adds gizmo_routing (which route answered and what was tried) and, when a reply has no text, gizmo_notice saying why.

Chat Completions (older format)

This is the older Chat Completions format: you send messages and read the reply from choices[0].message.content. It keeps working, so existing code needs no changes. For new code, use Responses (new, recommended): it takes input and returns output_text, with the same models, keys, routing and prices.

POST/api/v1/chat/completions
FieldAccepted values
modelRequired exact model ID.
messagesRequired array of 1–200 messages. Each has role and string content. Roles: system, developer, user, assistant.
routingOptional: fastest (the default when left out) or cheapest. See Routing & discounts.
streamBoolean; false by default.
max_tokensInteger from 1 to 32,768; default 1,024. Reasoning models count their thinking toward it: a value that is too low returns content: null with finish_reason "length" (the reply then includes gizmo_notice). Provider limits may be lower.
reasoning_effortOptional: none, minimal, low, medium, high or xhigh. How much a reasoning model thinks before it answers; lower is faster and cheaper, and none skips it where the model allows. Models that do not reason ignore it.
temperatureNumber from 0 to 2; model support varies.
top_pNumber from 0 to 1; model support varies.
stopA string or up to four strings.
stream_optionsOptional include_usage boolean. Streaming usage is requested from the provider.
routing (optional)
Chat Completions · request
curl https://api.gizmoplatforms.com/api/v1/chat/completions \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-6-astra",
  "messages": [
    {
      "role": "user",
      "content": "Write a one-sentence bedtime story about a unicorn."
    }
  ]
}'

A non-streaming response uses the chat-completion structure, including choices and provider usage when available. Read the assistant reply from choices[0].message.content. Tool calls, image/audio content in messages, structured-output controls, and other unlisted fields are not supported by this endpoint.

Call your saved agents

Every agent you create in the playground is callable through your API key. Find its ID in agent settings or Developers → Agents. The API uses the same agent engine as chat, including instructions, model, fastest/cheapest routing, web search, page reading, and your image model setting. Disabled tools stay disabled.

GET/api/v1/agents

Returns your account’s unarchived agents in a data array, including their IDs and saved settings. Other accounts cannot discover or call them.

POST/api/v1/agents/runs
Call a saved agent
curl https://api.gizmoplatforms.com/api/v1/agents/runs \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: research-001" \
  -d '{
  "agent_id": 123,
  "input": "Research the latest developments and give me a concise summary."
}'

Required fields: integer agent_id and string input (1–32,000 characters). Replace 123 with your agent’s ID. Settings are snapshotted when the run is admitted; changes affect future runs. Each API run starts a separate conversation, so it does not read your other playground chats. Raw model calls still use /chat/completions.

HTTP 202 returns id, agent_id, status, settings, and poll_url. Reuse an Idempotency-Key of up to 128 printable characters with the same API key to retrieve the original run. Changed input with the same key still returns that original run.

GET/api/v1/agents/runs/:id

Poll with your API key about once per second. Status is queued, running, completed, failed, or interrupted. Interrupted runs are never automatically replayed because tools may already have executed. Inspect results before starting a replacement.

Read the result in JavaScript
# GET the run's poll_url; output includes text and tool-result blocks.
curl https://api.gizmoplatforms.com/api/v1/agents/runs/RUN_ID \
  -H "Authorization: Bearer $GIZMO_API_KEY"

output contains assistant messages with text, tool_call, and tool_result blocks. Generated-image URLs appear in tool results. calls contains gateway receipts with the requested and actual model, provider, route, tokens, fee, covered usage, and charge. cost_usd: null means running or awaiting a provider receipt; it never means free.

Up to three agent runs can be active per account. Submissions share API rate limits with text and image requests; each admitted free-model backend pass counts against the monthly free-model quota. Paid model and image-tool usage draws from included usage and balance, with the same plan fee. Tools can produce multiple model passes.

GPT-Live-1 voice agents

Choose GPT-Live-1 under Voice when creating an agent, or in its Model settings. The selected text model remains its reasoning backend. GPT-Live-1 listens and speaks in real time, while Gizmo executes delegated work with that agent’s saved instructions, routing, and enabled tools. Press Start voice in the playground to talk, or connect your application through WebRTC.

POST/api/v1/live/sessions
Create voice on your server
# Server side: return transport.sdp to the browser (pc.setRemoteDescription), never the API key.
curl https://api.gizmoplatforms.com/api/v1/live/sessions \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agent_id": 123,
  "sdp": "OFFER_SDP_FROM_THE_BROWSER"
}'
  1. In your browser, request microphone permission, create an RTCPeerConnection, add its audio track, and create a data channel named oai-events.
  2. Create an SDP offer and set it as the local description. Send its SDP to your server, which calls Gizmo with the agent ID and API key.
  3. HTTP 201 returns Gizmo’s id, transport.sdp, and poll_url. Apply the answer and play the remote audio track.
  4. Wait for session.started before sending commands. Transcript deltas and usage updates arrive on the data channel. Gizmo’s server handles delegation; do not execute it again in your frontend.
  5. Send session.close, or have your server call DELETE /api/v1/live/sessions/:id. Keep the connection open until session.closed before releasing audio and transport resources.

The frontend may send only session.close, session.input_audio.mute, and session.input_audio.unmute. Tool permissions and billing are enforced by the trusted server connection. Poll GET /api/v1/live/sessions/:id for status, provider duration, and billing. Never submit client-measured duration as a charge.

Voice pricing

GPT-Live-1 costs $0.05/minute before Gizmo’s fee: $0.0525/minute on Free or $0.052/minute on paid plans, billed per second. WebRTC initialization bills 15 seconds, credited against running duration rather than added again. Reasoning-model and tool charges are separate; free backend models do not make voice free.

One voice session may be active per account. Sessions close after ten minutes and reserve that duration plus a 30-second finalization buffer and the plan fee. Unused funds return after trusted final usage. A lost final receipt stays pending. Muting the microphone does not stop duration billing. Voice audio and control connections use OpenAI directly; eligible backend text passes use Cloudflare AI Gateway.

Voice requires GPT-Live-1 access on the configured OpenAI project. See OpenAI’s Live guide for transport details. Audio recordings are disabled; delegated agent conversations and metadata are retained in Gizmo.

Streaming

Set stream: true to receive server-sent events. Use an SSE parser or a compatible streaming client: chunks can span network reads. Text arrives in choices[].delta.content; provider events may include reasoning or usage. The stream ends with data: [DONE].

Illustrative SSE text event
data: {"choices":[{"index":0,"delta":{"content":"Hello"}}]}

data: [DONE]

With Responses, the stream uses named events: text arrives in response.output_text.delta events, and it ends with response.completed (or response.incomplete when it reached max_output_tokens), which carries the whole response and its usage.

Illustrative SSE text event
event: response.output_text.delta
data: {"type":"response.output_text.delta","item_id":"msg_…","output_index":0,"content_index":0,"delta":"Under","sequence_number":4}

event: response.completed
data: {"type":"response.completed","response":{"id":"resp_…","object":"response","status":"completed","output_text":"Under a blanket of starlight…","usage":{…}},"sequence_number":40}

Save the x-request-id header before consuming the stream. A provider error can arrive after HTTP headers have been sent, so inspect error events as well as the HTTP status. Disconnecting your client does not guarantee cancellation: completed provider work can still be metered.

Routing & discounts

routing is optional. Leave it out and requests use "fastest", the default. Add "routing": "cheapest" to any Responses or Chat Completions request to prefer lower prices; with an OpenAI SDK, pass extra_body={"routing": "cheapest"} (Python) or add routing to the request (JavaScript).

Fast mode · fastest (default)

Goes straight to the model’s maker (OpenAI, Anthropic, Google) when it can, then OpenRouter sorted by latency, then any other route. A routing preference, not a fixed response-time guarantee.

Cheap mode · cheapest (optional)

Lowest price first: Cheaper Inference when it is discounted, OpenRouter’s endpoints cheapest-first (including discounted tiers such as OpenAI Flex, which may be a little slower), then the model’s maker. Never above the model’s list price.

Requests never stop at one provider: every route that can serve the model is tried in order, and a route that fails before answering hands the request to the next. Responses include gizmo_routing (which route answered and every attempt) and the x-gizmo-fallback and x-gizmo-attempts headers, and the request log marks each fallback. You pay only for the route that answered, at its price; if every route fails, nothing is charged.

Cheaper Inference routes enforce the quoted minimum discount. If qualifying capacity is unavailable, the request fails instead of silently retrying at a higher price. Tiered-price models currently use OpenRouter; larger output limits may also require that route. Availability and savings vary. See current pricing and discounts.

The x-gizmo-provider response header and request log identify the upstream service. Requests pass through Cloudflare AI Gateway. Image and video generation use the model you select and do not take text routing preferences.

Image generation

Images use asynchronous jobs. This is a dedicated Gizmo API, not the synchronous OpenAI Images response format. Each request generates one image.

POST/api/v1/images/generations
Submit an image job
curl https://api.gizmoplatforms.com/api/v1/images/generations \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: example-image-001" \
  -d '{
  "model": "flux-2-pro",
  "prompt": "A sculptural glass vase in soft morning light"
}'

Required: model and a prompt of 1–4,000 characters. Optional settings: aspect, resolution, format, quality (GPT Image), and rendering_speed (Ideogram), where supported by the model. Pass references as an array of up to four owned file or library image IDs (Qwen accepts three). Supported models edit those images; Krea and Ideogram 3 use style references. Unsupported references or controls return 400. GET /api/v1/images/models lists exact controls and reference limits. Each image model has a dedicated profile. Set save_to_library: true to save the completed image automatically; optional folder_id chooses a folder, and null or omission means root.

HTTP 202 returns a job with id, status, and poll_url. Reuse the same Idempotency-Key (up to 128 characters) with the same API key to retrieve the original job without generating again. Use a new value for a different image; a reused value returns the original job even if the body changes.

GET/api/v1/images/generations/:id

Poll the returned URL about every five seconds with your API key. Status progresses through queued and generating to completed or failed. A job marked attention needs support review before retrying. Completed results include url, costUsd, feeRate, and billingPending. Result URLs use the API origin; resolve any relative URL against your configured API base.

A completed image can still have pending billing. Treat costUsd: null as unsettled, not free. Image jobs continue after you close the page.

GET/api/v1/images/generations

Returns the account’s latest 50 API image jobs in a data array. View persistent history, receipts, and saved results in the image playground.

Video generation

Videos use asynchronous jobs, like images: submit one clip per request, then poll. Video generation is part of Starter ($20/month) and above; other plans get 402 upgrade_required. Every model takes a text prompt; give an image to animate a start frame, and on supported models an end_image for the last frame.

POST/api/v1/videos/generations
Text to video
curl https://api.gizmoplatforms.com/api/v1/videos/generations \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: example-video-001" \
  -d '{
  "model": "veo-3.1-fast",
  "prompt": "Slow dolly shot through a rain-soaked neon alley at night",
  "settings": {
    "duration": 8,
    "aspect": "16:9",
    "resolution": "720p",
    "audio": true
  }
}'
Image to video
curl https://api.gizmoplatforms.com/api/v1/videos/generations \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kling-v3-pro",
  "prompt": "The camera pushes in as she turns and smiles",
  "image": "LIBRARY_IMAGE_ID",
  "end_image": "OPTIONAL_LAST_FRAME_ID",
  "settings": {
    "duration": 5,
    "audio": true
  }
}'

Required: model and a prompt (up to 4,000 characters; optional when you pass an image). Optional settings: duration (seconds), aspect (text to video; image to video follows the image), resolution, audio, and negative_prompt, where the model supports them. image and end_image are file or library image IDs from POST /api/v1/library/uploads. Unsupported values return 400 with the model’s accepted options. Completed videos are saved to your video history; pass save_to_library: false to skip the saved mark.

GET/api/v1/videos/models

Lists every video model with its exact durations, aspect ratios, resolutions, audio support, last-frame support, today’s provider price (price.unit_price_usd per price.unit) and an estimate for a default clip. Each video model has a profile page.

GET/api/v1/videos/generations/:id

Poll about every ten seconds. Status moves from queued to generating to completed or failed; most clips take one to five minutes. A completed job includes url (an MP4 that supports range requests for streaming), costUsd, feeRate and billingPending. The same Idempotency-Key with the same key returns the original job instead of generating again.

Billing: a temporary hold covers variable pricing, then you pay the provider’s metered cost plus your plan fee (5% Free, 4% paid), with your plan’s included usage applied first. Treat costUsd: null as unsettled, not free. Jobs keep running after you disconnect.

GET/api/v1/videos/generations

Returns the latest 50 API video jobs in a data array.

MCP server

Gizmo is a remote MCP server (Streamable HTTP). Connect it once and Claude, ChatGPT, Cursor or any MCP client can generate images and video with every Gizmo model, and control the computers connected to your account. Usage is billed to your Gizmo account exactly like the API.

Overview, example prompts and billing for Claude and ChatGPT →

MCPhttps://gizmoplatforms.com/api/mcp

Connect

  • Claude: Settings → Connectors → Add custom connector. Paste the URL above, click Connect, sign in to Gizmo and allow access.
  • ChatGPT app / Codex (Plugins → MCPs → Add → Connect to a custom MCP): set Type to Streamable HTTP (not STDIO), paste the URL above, save, and sign in to Gizmo when asked.

Clients that can send headers (Claude Code, Cursor, custom agents) can use an API key instead of signing in:

Claude Code
claude mcp add --transport http gizmo https://gizmoplatforms.com/api/mcp \
  --header "Authorization: Bearer $GIZMO_API_KEY"

Clients that can neither sign in nor send headers can use the URL form https://gizmoplatforms.com/api/mcp/<API key>. Treat that URL as a secret and use a dedicated key you can revoke.

Apps that only run a local command (STDIO)

If an app only accepts a command to launch, use the mcp-remote bridge (needs Node.js): command npx, arguments -y, mcp-remote and https://gizmoplatforms.com/api/mcp. The first time it opens a browser so you can sign in to Gizmo.

Apps configured with a JSON file (Claude Desktop, Cursor, Windsurf…)
{
  "mcpServers": {
    "gizmo": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://gizmoplatforms.com/api/mcp"]
    }
  }
}

To skip the browser sign-in, add the arguments --header and Authorization: Bearer ${GIZMO_API_KEY}, and set the environment variable GIZMO_API_KEY to a Gizmo API key.

Codex (~/.codex/config.toml)
[mcp_servers.gizmo]
url = "https://gizmoplatforms.com/api/mcp"
bearer_token_env_var = "GIZMO_API_KEY"

Image and video tools

ToolWhat it doesArguments
generate_imageCreates one image with any image model and returns it inline in the chat, with a link. Pass reference images to edit a picture or guide the style.prompt, model, aspect_ratio, resolution, format, quality, reference_images
generate_videoCreates a video: text to video, or image to video from a start frame (and a last frame on supported models). Returns a link to the MP4.prompt, model, duration, aspect_ratio, resolution, audio, start_image, end_image, negative_prompt
get_generationChecks an image or video by id and returns the result and its cost once it is ready.id, wait_seconds
list_image_modelsLists every image model with its options and starting price.—
list_video_modelsLists every video model with its durations, aspect ratios, resolutions, audio support and price.—
upload_imageBrings in an image from a public https link (or base64) to use as a reference or start frame.image_url | image_base64 + mime_type
list_generationsLists recent image and video generations with their links.kind, limit

Images come back inline in the chat plus a link. Videos take 1–5 minutes: generate_video waits about 75 seconds, then returns an id, and the assistant calls get_generation until the MP4 link is ready. Reference images and start frames can be Gizmo image ids or public https links. Image and video generation need the Starter plan or above.

Try asking

  • “Make a 3:4 poster of a lighthouse at dawn with Ideogram 3.”
  • “Turn this photo into an 8-second Veo 3.1 clip with sound.”
  • “Compare Nano Banana Pro and GPT Image 2 on the same prompt.”

Machine tools

Every machine action is a tool on the same server. Action tools return the new screenshot as an image; machine_id is optional when exactly one machine is online, and every tool takes display for multi-monitor setups. Connecting computers and the REST equivalents are described in Remote machines.

See the screenlist_machines, screenshot, zoom, list_apps
Mouseclick, double_click, right_click, move_mouse, mouse_down, mouse_up, drag, scroll
Keyboardtype_text, press_key, key_down, key_up
Appsactivate_app, quit_app
Otherwait, computer

Each connection gets its own key, and you can see every connected app with its usage (spend, requests, tokens, images, videos) in Settings → Connected apps, where you can also disconnect it.

One image library, every agent

Your library is shared across the image playground, agents, and API keys belonging to your account. Every endpoint requires your Bearer key. Library requests do not generate images or incur an inference fee. Image IDs are stable file IDs.

Upload and save to root
curl https://api.gizmoplatforms.com/api/v1/library/uploads \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mime": "image/png",
  "data": "BASE64_IMAGE_BYTES",
  "title": "Brand reference",
  "folder_id": null
}'

Uploads accept PNG, JPEG, or WebP up to 10 MB. To save an existing upload, playground result, or agent-generated file, POST {"file_id":"IMAGE_ID","folder_id":null,"title":"My image"} to /api/v1/library/images. Saving the same file updates its existing library entry.

  • GET /api/v1/library/images lists all saved images; ?folder_id=root shows root, or specify a folder ID. Optional search searches titles and prompts. Pages contain up to 50 entries in data; pass the returned next value as before for the next page.
  • GET /api/v1/library/images/:id retrieves metadata, MIME type, size, model, title, folder, and URLs. GET /api/v1/library/images/:id/content returns image bytes with authentication. The ordinary url is a shareable file link; treat it as private if you do not want others to view it.
  • PATCH /api/v1/library/images/:id accepts title and/or folder_id. Use null to move to root. DELETE unsaves the item, preserving existing attachments and generated results.
  • GET /api/v1/library/folders lists folders and counts. POST creates a folder with {"name":"Campaign"}. PATCH /api/v1/library/folders/:id renames it. DELETE moves its images to root and removes the folder. Folders are one level deep; root is always available.
Reuse library images with your saved agent
curl https://api.gizmoplatforms.com/api/v1/agents/runs \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agent_id": 42,
  "input": "Describe this reference for our campaign",
  "images": [
    "LIBRARY_IMAGE_ID"
  ]
}'

Supply up to four saved image IDs. Choose an agent with a vision-capable text model to analyze images. Saved agent tools and settings still apply. For image editing, pass the same IDs in references to the image-generation endpoint; references must total at most 10 MB. Another account’s image or folder returns 404.

Remote machines

Give any agent a computer. Machines are your own Macs running the Gizmo Remote app, or Linux cloud machines running the headless agent (auto-deployed over SSH from the Machines page, or set up by hand). A machine can only do three things: take a screenshot, move and click the mouse, and press keys. It runs no AI of its own and has no file, shell or network access for callers; the agent decides every step from a screenshot. Remote control has to be switched on in the app before any action is accepted.

In the playground, connect a machine to an agent in its settings (Machines tab). It appears in the chat’s right panel with a live view and the agent gains a computer tool. Machines are siloed: each belongs to one agent at a time and only that agent’s chats can drive it. Only vision-capable models can control a machine.

GET/api/v1/machines

Lists the account’s machines in a data array: id, name, kind (mac or cloud), status (online, offline, deploying, error), control_enabled, screen size, and agent_id. Filter with ?agent_id=. GET /api/v1/machines/:id returns one machine.

POST/api/v1/machines/:id/screenshot
Take a screenshot
curl https://api.gizmoplatforms.com/api/v1/machines/MACHINE_ID/screenshot \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "include_base64": true
}'

Returns screenshot with url, width, height (pixels; at most 1440 wide) and, on request, base64. GET …/screenshot?format=image streams the JPEG directly. Coordinates for every other action are pixel positions in this image; the machine maps them onto its real display, so Retina scaling is handled for you.

POST/api/v1/machines/:id/actions
Click, then type
curl https://api.gizmoplatforms.com/api/v1/machines/MACHINE_ID/actions \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "actions": [
    {
      "type": "click",
      "x": 640,
      "y": 420
    },
    {
      "type": "type",
      "text": "hello from an agent"
    },
    {
      "type": "key",
      "key": "enter"
    }
  ]
}'

Send one action or up to 20 actions run in order (the batch stops at the first failure). Every action returns the screenshot taken right after it, so the next decision always has a fresh view. Add "include_base64": true to inline the image.

typefieldsnotes
screenshotdisplay, zoom {x, y, width, height}, max_widthCapture display 1 (default), N, or "all" in one picture. zoom returns a full-resolution crop for small UI without changing the coordinate space.
clickx, y, button (left|right|middle), clicks (1|2|3), modifiersAliases: double_click, right_click. modifiers: shift, cmd, alt, ctrl, fn held during the click.
movex, y, modifiersHover; while a button is held it drags.
mouse_down / mouse_upx, y (optional), button, modifiersHand-controlled drags, scrubbing, painting: press, several moves, release.
dragx, y, to_x, to_y or path [[x,y],…], duration_ms, button, modifiersTimed drag with intermediate events so timelines, sliders and canvases register it. alt-drag duplicates, shift-drag constrains.
scrolldx, dy, units (line|pixel), optional x, y, modifiersPositive dy scrolls down. pixel units for fine scrolling; cmd-scroll zooms timelines.
typetext (1–20000 chars), method (type|paste), delay_mspaste delivers long text instantly via the clipboard.
keykey, repeat (1–100), hold_msenter, tab, escape, space, cmd+c, ctrl+shift+t, cmd+space, left ×10…
key_down / key_upkey (a key or a lone modifier)Hold shift across clicks, hold space to scrub, modifier-held gestures.
waitms (max 30000)Let a render, export or page finish, then screenshot.

Every action accepts display (1 = main, 2…, or "all"); results include a displays list with each screen’s index, name, size and arrangement. Optional ref_width/ref_height state which image size your coordinates refer to (useful when you work from the live-view frame). Anthropic computer-use style fields (action: "left_click", coordinate: [x, y]) are accepted too. A machine that is offline or has remote control switched off returns 409; a machine that does not answer in time returns 504 and nothing is charged.

Every machine action is also a tool on Gizmo’s MCP server, so Claude, ChatGPT or any MCP client can drive your machines directly. See MCP server for how to connect and the full tool list.

Pricing and logs

Machine actions are free for now. If that changes, the per-action price is listed on the Machines page and charged to your balance with no platform fee. Every action, whether from the API, MCP, the playground or the workspace console, appears in Developers → Logs as computer/<type> with its duration, status and charge. Actions share a per-minute cap (120 by default) across the account.

Models on your machines

Load any model onto a computer you connected and run it there: any Ollama model (qwen3:8b), any GGUF on Hugging Face (hf.co/org/repo:Q4_K_M) for chat, or a Hugging Face diffusers repo (Lightricks/LTX-Video) for images and video. Gizmo Remote and the Linux agent start a small model runtime next to themselves; it installs Ollama and the image/video environment on first use and reports the machine's hardware, live load and models.

Runs are free: they use your own hardware. Models work on machines connected through Gizmo Remote (with Local models switched on) or the Linux agent 1.3 and later, not on cloud browsers or manually configured agents. For gated Hugging Face repos, accept the license on Hugging Face and set HF_TOKEN on the machine.

EndpointWhat it does
GET /api/v1/machines/:id/modelsThe models on the machine in OpenAI list shape, plus runtime status, hardware, live load and what is loaded in memory.
POST /api/v1/machines/:id/modelsLoad a model: {"model", "kind"?}. Downloads in the background and answers 202.
DELETE /api/v1/machines/:id/models?model=…Delete a model from the machine's disk.
POST /api/v1/machines/:id/models/unloadFree the memory a model holds, keeping it on disk: {"model"}.
POST /api/v1/machines/:id/chat/completionsOpenAI-compatible chat on a model on the machine. JSON or server-sent events with stream: true.
POST /api/v1/machines/:id/jobsRun any model: chat (prompt or messages), image or video (prompt and settings). Answers 202 with the job; wait (up to 100 s) holds the response until it finishes.
GET /api/v1/machines/:id/jobsThe machine's recent runs.
GET /api/v1/machines/:id/jobs/:jobOne run: status, progress, stage, chat text or the image / video file. ?wait=<seconds> returns as soon as it finishes.
DELETE /api/v1/machines/:id/jobs/:jobStop a queued or running run.

Load a model

Load qwen3:8b onto a machine
curl https://api.gizmoplatforms.com/api/v1/machines/MACHINE_ID/models \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen3:8b"
}'

# then poll until the model's status is "ready"
curl https://api.gizmoplatforms.com/api/v1/machines/MACHINE_ID/models \
  -H "Authorization: Bearer $GIZMO_API_KEY"

While it downloads the model shows status pulling with progress from 0 to 1, then ready. The same response carries runtime with the hardware, stats (CPU, memory and per-GPU load) and loaded (models in memory).

Chat with the OpenAI SDK

Point any OpenAI SDK at https://api.gizmoplatforms.com/api/v1/machines/MACHINE_ID with your Gizmo API key. stream: true streams tokens as the machine generates them, and client.models.list() lists the machine's models.

Stream from a model on your machine
curl https://api.gizmoplatforms.com/api/v1/machines/MACHINE_ID/chat/completions \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen3:8b",
  "messages": [
    {
      "role": "user",
      "content": "Hello from my own GPU"
    }
  ]
}'

Images and video

Generate a video on your GPU
curl https://api.gizmoplatforms.com/api/v1/machines/MACHINE_ID/jobs \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "Lightricks/LTX-Video",
  "prompt": "a fox running through snow at dawn",
  "settings": {
    "width": 768,
    "height": 512,
    "num_frames": 97,
    "fps": 24,
    "steps": 30
  }
}'

# returns 202 {"id": "…", "status": "queued", …}; wait up to 100 s per call
curl "https://api.gizmoplatforms.com/api/v1/machines/MACHINE_ID/jobs/JOB_ID?wait=100" \
  -H "Authorization: Bearer $GIZMO_API_KEY"

Set kind to chat, image or video (detected from the model when left out). Chat takes prompt or messages; images and video take settings and width: height, num_frames, fps, steps, guidance_scale, seed, negative_prompt, image_file_id, and wait (an uploaded Gizmo image as the start frame). Poll with file.url; a finished video or image is at output_text, chat text in DELETE. Stop a run with {c21}.

MCP tools

The Gizmo MCP server (MCP server) has the same controls, so Claude or ChatGPT can load a model onto your computer and run it:

list_machine_modelsHardware, live load, models on disk and in memory, and runs in progress.
load_modelDownload any Ollama or Hugging Face model onto the machine.
remove_modelDelete a model from the machine.
unload_modelFree a model's memory, keeping it on disk.
run_modelRun a chat, image or video model; returns the text or the file link.
get_model_runStatus and result of a run.
stop_model_runStop a run.

Runs on your machines are not billed and appear in Developers → Logs as machine/<model>.

Billing & limits

Actual provider cost plus 5% on Free or 4% on paid plans. The fee-inclusive charge draws from your included usage first, then prepaid credits. Memberships bill monthly; dollar allowances reset weekly. Free-model API quotas reset on the first of the month in UTC.

PlanWeekly usageFeeAPI / minPlayground / minFree API / month
Free$15%2061,000
Starter$54%603010,000
Growth$254%1806050,000
Scale$504%600120100,000

Zero-cost models remain $0 within plan quotas. Admitted free requests count even when the provider fails. Text and image API submissions share the account’s API rate limit. Up to eight image jobs may be active at once.

Temporary reservations

Text calls reserve the model’s full input context plus maximum requested output at the published rate ceiling, including the fee. Image jobs reserve twice the estimate plus the fee. The hold can be much larger than the final cost. Unused funds return after confirmed metering; unknown provider charges stay pending.

Manage your plan and prepaid balance →

Logs & tracking

Text request logs show IDs, timestamps, model, route, service, status, tokens, first-token latency, duration, and total charge. Filter by status or search by model or exact request ID. Live updates run every five seconds while visible and pause when viewing older history.

Request logs store metadata, not prompt or response content. Agent conversation history and tool results are stored separately in the agent’s sessions. API and playground model calls appear here; native models and image tools identify their catalog tariff, while gateway calls use settled provider receipts; each tool loop can produce multiple receipts. Image prompts and results are retained in image history. The overview combines text and image API usage; image-specific receipts live in the image playground. Use the shared account ledger to inspect allowance and balance movements.

Errors & retries

StatusMeaningNext step
400Invalid requestCheck supported fields, model controls, and JSON.
401Invalid or revoked keyCheck your Authorization header and active key.
402Insufficient available usageCheck reservations, add credits, or choose a cheaper model.
404Model or job unavailableRediscover available models or check the job ID.
413Request too largeReduce the request body.
429Rate, quota, or concurrency limitWait for the applicable limit to reset; do not retry immediately.
502 / 503 / 504Provider, gateway, or timeout failureInspect request logs before retrying.

Text errors use error.message, error.type, and error.code, with a request ID when available. Image endpoints currently return error as a string. Handle both shapes in shared clients.

Use bounded exponential backoff with jitter for transient failures and honor Retry-After when returned. A monthly quota needs a reset or plan change. Text requests do not support idempotency: a blind retry may create another charge. For image submissions, reuse the same idempotency key when delivery is uncertain.

Contact support with your request ID →