API overview
Documentation
qui serves interactive API documentation with Swagger UI at /api/docs. You can browse all endpoints, view request and response schemas, and test API calls from your browser.
API keys
API keys give programmatic access to the qui API without session cookies. Create and manage them in Settings → API Keys.
qui also has client proxy API keys. Those keys let external applications, for example Sonarr or autobrr, reach your qBittorrent instances through the qui proxy. They do not grant access to the qui API. See Reverse Proxy.
Include your API key in the X-API-Key header:
curl -H "X-API-Key: YOUR_API_KEY_HERE" \
http://localhost:7476/api/instances
Session cookies
The session cookie is for the qui web UI. Use an API key for scripts. See Sessions for the rules that apply to cookie requests.
Torrent updates
GET /api/stream sends torrent updates through Server-Sent Events. See /api/docs for subscription parameters and event examples.
Keep the version from each accepted snapshot or delta. Apply a delta only when its baseVersion matches that version and its minor increases by one within the same major. If the versions do not match, reconnect for a full snapshot and use REST polling until it arrives.
In a delta, omitted counts and preferences retain their previous values. Explicit preferences: null clears preferences. Omitted categories and tags mean empty collections.
Security notes
- qui shows an API key only once, at creation. Save it in a safe place.
- You can revoke each key on its own. Other keys remain active.
- A key has the same permissions as the main user account.