Darkgrade runs a Sony, Canon or Nikon camera from a computer, and everything in it goes through Slate, the TypeScript library that talks to your camera in the camera's own language. Studio, MCP and the CLI are built on it, so what you learn in one product works in the other three, on every supported brand.
What this means for you
- One name per idea. Sony's Creative Look, Canon's Picture Style and Nikon's Picture Control are all one setting, Look. The vocabulary lists every brand's own word for each.
- One spelling per value.
f/4,ISO 1600andDaylightare written the same on every brand. - Modes are handled for you. If a photo needs the camera in photo mode, Darkgrade switches, takes it, and switches back.
- Sent once, then confirmed. A shutter press or a record command is never sent twice. If a result can't be confirmed, you are told so.
- The camera says what it can do. One question, what the camera can do, returns every setting, its current choices, and which operations work right now.
Four products, one path
You ask for something in the product that suits you. That product passes the request to Slate. Slate turns it into your camera brand's commands, sends them, and confirms the camera did it.
- Studio holds the camera while it's open. Its controls, live view, recording and card browser call Slate directly, and its voice control turns what you say into the same operations.
- MCP is a set of tools, one per operation, that an AI app such as Claude can call. There are three ways to serve them. Studio serves them when you turn on Let AI apps control the camera in its Settings, so Claude runs the camera Studio has open. The CLI serves them from one command,
darkgrade mcp, which holds the camera itself with no Studio and no code. Developers can write their own server with Slate. - The CLI opens the camera, runs one operation and closes it again, so each command stands alone in a script.
- Your code imports Slate and calls
Cameraitself.
Every product connects over USB. Slate can also open a camera over Wi-Fi; the other three cannot.
Follow one request
Here is what happens when you set the ISO, from the moment you ask.
- 1
You ask, in your product's way
All four are the same request:
Click the microphone and say: “Set ISO to 800”Ask Claude: “Set ISO to 800” → camera_set_iso { "value": "ISO 800" }npx darkgrade camera set-iso 'ISO 800'await camera.setIso('ISO 800') - 2
Slate checks it against the camera
Slate asks the camera what it offers right now: its mode, lens and firmware all change the choices. A value the camera isn't offering is refused here, with the reason, and the setting is never written.
- 3
Slate says it in your brand's words
ISO is a different code on every brand. Slate picks the right one for your camera and sends it once.
- 4
The camera answers, and Slate confirms
Slate reads the setting back from the camera. You get the value the camera now reports, so done means the camera really changed.
Taking a photo, recording and downloading a file follow the same path. A photo is confirmed by its new file, and a recording by the finished clip on the card.
Your camera speaks PTP
Cameras talk to computers in a standard protocol called PTP, the Picture Transfer Protocol (ISO 15740). It is how a computer imports photos over USB, and it can do much more:
- Operations tell the camera to do something: take a picture, send a file.
- Properties are its settings: ISO, aperture, white balance.
- Events are the camera telling the computer something changed: a new file is on the card.
Each manufacturer adds its own codes on top for live view, focus, video and most settings. That is why camera software is usually made for one brand. Slate has a driver for Sony, one for Canon and one for Nikon, and picks the right one when it connects.
You never need to know PTP to use Darkgrade. If you're curious, What is PTP? explains the protocol, and the glossary has the other words these docs use.
For developers: drivers, errors and raw protocol access
For developers: drivers, errors and raw protocol access
- Drivers.
Camerachooses a Sony, Canon or Nikon driver from the USB device it opens. Other brands Slate knows (Fujifilm, Panasonic, Olympus and OM System, Leica, Sigma) open with a driver for standard PTP plus that brand's codes, and any other PTP camera with the standard driver alone. Camera compatibility says what that covers. - Capabilities.
getCapabilities()returnscontrols(each setting's value andallowedValues) andoperations(whether each can run now, with areasonwhen it can't). Read it instead of checking the model name. - Errors. Every failure is one of three types:
CameraUnsupportedError(nothing was sent),CameraRefusedError(the camera said no) orCameraOutcomeUnknownError(sent, not confirmed, never resent). See Errors and recovery. - Events.
camera.on('settingsChanged' | 'mediaAdded', handler)fires when a setting changes on the camera or a new file lands. See Events. - Wi-Fi. Canon, Nikon and other PTP cameras connect over a network with PTP/IP; Sony uses its own SDK. See Wi-Fi with PTP/IP.
- Under
Camera. Raw PTP commands and property codes are onprotocolSession(camera). See Raw protocol access and the PTP reference.