---
title: "Call a plugin RPC"
method: POST
path: "/api/rpc/{rpcID}/{method}"
tags: ["rpc"]
---

# Call a plugin RPC

`POST /api/rpc/{rpcID}/{method}`

## Request

- Base URL: `https://opencode.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://opencode.ai/api/rpc/{rpcID}/{method}`
- Auth: none required

Dispatch a method to the currently registered RPC at the requested location.

## Path parameters

- `rpcID` string, required
- `method` string, required

## Query parameters

- `location` object, nullable
  - `directory` string, nullable

## Request body

- RpcInput
  - `input` unknown

## Response `200`

Rpc.Output

- RpcOutput
  - `output` unknown

## Other responses

- `400`: RpcError | InvalidRequestError
- `401`: UnauthorizedError
- `404`: LocationNotFoundError
- `500`: RpcInternalError

---

[API](https://skmtc.dev/kaaass/apis/opencode.md) - [All operations](https://skmtc.dev/kaaass/apis/opencode/llms.txt) - [OpenAPI document](https://skmtc.dev/kaaass/apis/opencode/revisions/4e083d954707?raw)
