For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • STREAMA2A JSON-RPC endpoint
      • GETGet A2A Agent Card
      • GETGet A2A surface info
Dashboard
LogoLogo
Runtype APIA2a

A2A JSON-RPC endpoint

POST
/v1/products/:productId/surfaces/:surfaceId/a2a
POST
/v1/products/:productId/surfaces/:surfaceId/a2a
$curl -X POST https://api.runtype.com/v1/products/productId/surfaces/surfaceId/a2a \
> -H "Authorization: <apiKey>"
A2A Protocol v1.0 JSON-RPC 2.0 transport endpoint. The request body is a JSON-RPC 2.0 envelope `{ jsonrpc: "2.0", id?, method, params }` dispatched on `method`. Method names are the 1.0 PascalCase forms; the legacy 0.3 slash-strings are still accepted as tolerant aliases: - `SendMessage` (alias `message/send`) — params: `{ message, configuration?, metadata? }`; returns an envelope whose `result` is `{ task }`. - `SendStreamingMessage` (alias `message/stream`) — params: same; returns a `text/event-stream` of A2A 1.0 StreamResponse events. - `GetTask` (alias `tasks/get`) — params: `{ id | taskId, historyLength? }`; returns a Task envelope. - `ListTasks` — params: `{ pageSize?, pageToken?, status?, includeArtifacts? }`; returns `{ tasks, nextPageToken, pageSize, totalSize }` (cursor-paginated). - `CancelTask` (alias `tasks/cancel`) — params: `{ id | taskId }`; returns a Task envelope. - `SubscribeToTask` (alias `tasks/resubscribe`) — params: `{ id }`; returns a `text/event-stream` of A2A 1.0 StreamResponse events. Each streaming `data:` line is a JSON-RPC response carrying a `StreamResponse` oneof (`statusUpdate` / `artifactUpdate`); errors stream as a JSON-RPC error envelope (`google.rpc.Status` form). The body is validated by the handler (not by request-schema middleware) so JSON-RPC error envelopes (`-32700`, METHOD_NOT_FOUND, INVALID_PARAMS) are preserved. Authentication is an A2A surface key (Authorization: Bearer a2a_xxx or X-API-Key header) or a Clerk JWT (dashboard testing).
Was this page helpful?
Previous

Get A2A Agent Card

Next
Built with

A2A Protocol v1.0 JSON-RPC 2.0 transport endpoint. The request body is a JSON-RPC 2.0 envelope { jsonrpc: "2.0", id?, method, params } dispatched on method. Method names are the 1.0 PascalCase forms; the legacy 0.3 slash-strings are still accepted as tolerant aliases:

  • SendMessage (alias message/send) — params: { message, configuration?, metadata? }; returns an envelope whose result is { task }.
  • SendStreamingMessage (alias message/stream) — params: same; returns a text/event-stream of A2A 1.0 StreamResponse events.
  • GetTask (alias tasks/get) — params: { id | taskId, historyLength? }; returns a Task envelope.
  • ListTasks — params: { pageSize?, pageToken?, status?, includeArtifacts? }; returns { tasks, nextPageToken, pageSize, totalSize } (cursor-paginated).
  • CancelTask (alias tasks/cancel) — params: { id | taskId }; returns a Task envelope.
  • SubscribeToTask (alias tasks/resubscribe) — params: { id }; returns a text/event-stream of A2A 1.0 StreamResponse events. Each streaming data: line is a JSON-RPC response carrying a StreamResponse oneof (statusUpdate / artifactUpdate); errors stream as a JSON-RPC error envelope (google.rpc.Status form). The body is validated by the handler (not by request-schema middleware) so JSON-RPC error envelopes (-32700, METHOD_NOT_FOUND, INVALID_PARAMS) are preserved. Authentication is an A2A surface key (Authorization: Bearer a2a_xxx or X-API-Key header) or a Clerk JWT (dashboard testing).

Authentication

Authorizationstring

A2A surface key sent as Authorization: Bearer a2a_... or X-API-Key: a2a_....

Path parameters

productIdstringRequired
surfaceIdstringRequired

Response

JSON-RPC response envelope (unary methods) or an SSE event stream (SendStreamingMessage, SubscribeToTask).

object
OR
object
OR
object

Errors

500
Internal Server Error