How to Use Perceptron Mk1 in opencode
Perceptron Mk1 analyzes images and video for document extraction, object counting, and event timing. Use it to answer questions about visible actions or find a demonstrated item in new footage.
Prompts to try with Perceptron Mk1 in opencode
Copy an example into opencode, or ask in your own words.
Use Perceptron Mk1 to inspect the product images in this project's assets directory. Draft one factual accessibility description per image, under 35 words, and save a reviewable mapping from filename to description.
Use Perceptron Mk1 to read the serial-plate images in the test fixtures. Return manufacturer, model number, and serial number as JSON; mark unreadable values as null.
Use Perceptron Mk1 to review the 30-second robot demonstration in this repository. Enable reasoning and report the observed goal, ordered actions, and visible outcome in under 500 words.
Use Perceptron Mk1 to compare the labeled defect examples with the inspection images in this project. List matching defects by filename and explain the visible evidence.
Use Perceptron Mk1 to count the visible cartons in the warehouse test images. Define partially visible cartons separately and return a compact result for each filename.
How to set up Perceptron Mk1 in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Perceptron Mk1
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "openrouter", "model": "perceptron/perceptron-mk1", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: opencode finds Perceptron Mk1 on Spiral, shows the price and runs it.
Perceptron Mk1 providers and prices
Spiral runs Perceptron Mk1 through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.007995 per run at the default inputs. $0.195 per 1M input tokens, $1.95 per 1M output tokens.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Top k | a whole number from 0 | ||
| Top p | 0 to 1 | ||
| Max tokens | 1 to 8192 | The most output tokens to generate. | |
| Temperature | 0 to 2 | ||
| Presence penalty | -2 to 2 | ||
| Frequency penalty | -2 to 2 |
Every API field of Perceptron: Perceptron Mk1 is on its tool page: open its card above.
What can you do with Perceptron Mk1 in opencode?
Turn project images and recorded demonstrations into descriptions, extracted text, and event summaries. Use Perceptron Mk1 to supply visual evidence for asset work and inspection workflows.
Extract label and serial-plate text
Ask Perceptron Mk1 to transcribe visible labels into named fields, marking unreadable characters for review.
Create image descriptions
Use Perceptron Mk1 to draft accessibility descriptions and searchable metadata from product or editorial images.
Count visible inventory
Ask Perceptron Mk1 to count specified objects in shelf or tray images, with a clear rule for partially visible items.
Find a product in shelf footage
Show Perceptron Mk1 a reference product image, then ask where the same product appears in a shelf-walking video.
Locate sports highlights
Ask Perceptron Mk1 to identify a defined event, such as a ball passing through a hoop, and report its timing.
Review robot-task outcomes
Use Perceptron Mk1 to identify task attempts in recorded footage and describe the visible evidence for success or failure.
Check demonstrated defects
Give Perceptron Mk1 labeled defect examples and ask it to find matching visual evidence in inspection footage.
Break down training demonstrations
Ask Perceptron Mk1 to turn an assembly or training video into an ordered account of the observed actions.
More on Perceptron Mk1 and opencode
Overview
Perceptron Mk1 in other agents
More opencode guides
Questions about Perceptron Mk1 in opencode
Can opencode use Perceptron Mk1?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Perceptron Mk1 like any built-in tool.
How much does Perceptron Mk1 cost in opencode?
Up to $0.007995 per run at the default inputs. $0.195 per 1M input tokens, $1.95 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need an OpenRouter account to use Perceptron Mk1 in opencode?
No. Spiral runs Perceptron Mk1 on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up Perceptron Mk1 in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Perceptron Mk1 runs?
Perceptron Mk1 runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.
What is Perceptron Mk1 good at?
Use it for questions that depend on visual evidence: reading labels, counting objects, interpreting actions, and locating events in video. Reference images also help specify what to find in new footage.
Can Perceptron Mk1 analyze long videos?
Its documented sampling becomes sparser beyond about 128 seconds while still covering the full selected time window. For brief-event searches, a practical precaution is to split footage into relevant shorter segments.
How much can Perceptron Mk1 return?
The context window is 32,768 tokens, and a completion can contain up to 8,192 tokens. Ask for focused results, such as selected document fields or a list of relevant events.
How do I show Perceptron Mk1 an unfamiliar object?
Provide an annotated reference image and explain what it represents. Use several labeled examples when similar objects need to be distinguished.
When should I enable reasoning?
Perceptron's guidance recommends reasoning for text questions, captioning, OCR, and locating video events. It recommends turning reasoning off for spatial detection with points, boxes, or polygons.
Start using Perceptron Mk1 in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


