Transmission API
Apps & Automationtransmission-apiTransmission API is an Agent Skill for apps & automation published in the tympanix/Electorrent repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Transmission RPC reference covering JSON-RPC 2.0 transport, session token handling, torrent methods, session methods, and protocol versioning.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/tympanix/Electorrent/blob/HEAD/.github/skills/transmission-api/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/transmission-api, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Skill: Transmission API
Purpose
Use this skill when you need to integrate with Transmission's RPC API.
Protocol
- Preferred transport: HTTP
POST - Default endpoint:
http://host:9091/transmission/rpc - Current spec: JSON-RPC 2.0
- Request parameters must be an object in
params - Response data is returned in
result
Example request:
{
"jsonrpc": "2.0",
"params": {
"fields": ["version"]
},
"method": "session_get",
"id": 1
}
Authentication and session token
CSRF token
Most servers require X-Transmission-Session-Id.
- First request often gets
409 Conflict - The response includes the correct
X-Transmission-Session-Id - Retry the same request with that header value
Authentication
- Optional HTTP Basic Auth
- Credentials are sent in
Authorization: Basic ...
Method naming
- Transmission 4.1.0+ (
rpc_version_semver6.0.0+) uses JSON-RPC 2.0 andsnake_case - Older bespoke protocol and older
kebab-case/camelCasestrings are deprecated but still seen in existing clients
Torrent methods
Action methods
torrent_starttorrent_start_nowtorrent_stoptorrent_verifytorrent_reannounce
Common parameter:
ids: integer id, array of ids/hashes, or"recently_active"
torrent_get
Request:
- optional
ids - required
fields - optional
format:objectsortable
Important field families:
- core status:
id,hash_string,name,status,percent_done,eta,eta_idle - storage:
download_dir,files,file_stats,wanted,priorities,piece_count,piece_size,pieces - transfer:
rate_download,rate_upload,uploaded_ever,downloaded_ever,upload_ratio - peers/trackers:
peers,peers_from,trackers,tracker_stats,webseeds_ex - queue and policy:
queue_position,seed_ratio_limit,seed_idle_limit,labels,group,sequential_download
Status values:
| Value | Meaning |
|---|---|
| 0 | stopped |
| 1 | queued to verify |
| 2 | verifying |
| 3 | queued to download |
| 4 | downloading |
| 5 | queued to seed |
| 6 | seeding |
torrent_set
Common mutators:
download_limit,download_limitedupload_limit,upload_limitedpeer_limitfiles_wanted,files_unwantedpriority_high,priority_normal,priority_lowlocationqueue_positionlabelsgroupseed_ratio_limit,seed_ratio_modeseed_idle_limit,seed_idle_modesequential_downloadsequential_download_from_piecetracker_list
torrent_add
Supply either:
filenamefor URL or.torrentpathmetainfofor base64-encoded.torrentbytes
Useful optional parameters:
download_dirpausedlabelspeer_limitfiles_wanted,files_unwantedpriority_*sequential_downloadsequential_download_from_piece
Success returns torrent_added; duplicate adds return torrent_duplicate.
Other torrent methods
torrent_remove- params:
ids,delete_local_data
- params:
torrent_set_location- params:
ids,location,move
- params:
torrent_rename_path- params:
ids(single torrent),path,name
- params:
Session methods
session_get / session_set
Important keys:
- networking:
peer_port,port_forwarding_enabled,preferred_transports,encryption - directories:
download_dir,incomplete_dir,incomplete_dir_enabled - queues:
download_queue_enabled,download_queue_size,seed_queue_enabled,seed_queue_size - speed limits:
speed_limit_down,speed_limit_down_enabled,speed_limit_up,speed_limit_up_enabled - alternate speeds:
alt_speed_* - seeding policy:
seed_ratio_limit,seed_ratio_limited,idle_seeding_limit,idle_seeding_limit_enabled - versioning:
rpc_version_semver,version
Other session methods
session_statsblocklist_updateport_testsession_closefree_space- queue movement:
queue_move_top,queue_move_up,queue_move_down,queue_move_bottom - bandwidth groups:
group_set,group_get
Error object
JSON-RPC errors may include:
codemessagedata.error_stringdata.result
Versioning
- Prefer
rpc_version_semverfor compatibility checks rpc_versionandrpc_version_minimumare deprecatedX-Transmission-Rpc-Versionmay be returned on HTTP 409 responses on newer servers
Electorrent usage
Electorrent currently talks to Transmission using the legacy method names:
session-gettorrent-gettorrent-add- torrent action methods such as start/stop/remove
That works on current Transmission releases, but new integrations should prefer the JSON-RPC 2.0 snake_case forms from this spec.