Skip to main content
The Agents API is the same API the dashboard uses. Everything in the UI is exposed at agents.pinata.cloud - including agent management, secrets, skills, channels, snapshots, custom domains, devices, and engine runtime config. Full OpenAPI reference: agents.pinata.cloud/openapi (also linked from the Support → OpenAPI Docs item in the sidebar).

Base URLs

There are two surfaces, on purpose: The same agent sub-routes (/v0/agents/{agentId}/...) are mounted on both. Use the management host when you have the workspace owner’s JWT; use the per-agent host when you only have the gateway token.

Authentication

Three credentials, used in different contexts:

Pinata JWT

Standard Pinata API key (bearerAuth in the OpenAPI spec). Used for all management routes (/v0/agents, /v0/secrets, /v0/skills, /v0/templates, etc.).
Create one in your Account → API Keys.

Gateway token

Per-agent token (gatewayToken in the OpenAPI spec) used for the agent’s own subdomain. Read it from the agent’s Danger page or GET /v0/agents/{agentId}/gateway-token. Rotate it from the same page or POST /v0/agents/{agentId}/gateway-token/rotate. Passing the gateway token:
The gateway token grants full access to the agent’s container - console, files, routes, everything. Treat it like a server credential.

Git Basic auth

Used only by the Git Smart HTTP endpoints (/v0/agents/{agentId}/git/...). Sent as HTTP Basic auth - username is ignored, password is the gateway token. The Copy with Token button on the Files tab embeds this for you.

Platform JWT (for skills)

Inside an agent, the @pinata/platform skill can exchange the gateway token for a short-lived (1 hour) platform JWT. That JWT then unlocks the management-domain API (create secrets, install skills, etc.) on the agent’s behalf - so an agent can self-modify without ever seeing the user’s Pinata JWT.

Quick Examples

All examples below use PINATA_JWT (from https://app.pinata.cloud) or GATEWAY_TOKEN (from the agent’s Danger page).

List your agents

Create an agent

engine is optional and defaults to openclaw. Pass hermes for the opinionated engine — see Concepts → Engine. For chat-oriented engines, the dashboard exposes channel setup during create, and engines that support create-time channel bootstrap can accept a channels object on this request so Telegram, Slack, or Discord come up with the agent without a post-create gateway restart. Each channel object accepts: These are the same fields accepted by the per-channel POST /v0/agents/{agentId}/channels/{channel} endpoint and by channels in manifest.json. To list engines enabled for the current deployment:
Returns { "engines": [ { "id": "openclaw", "label": "OpenClaw" }, { "id": "hermes", "label": "Hermes" } ] }, depending on which engines are enabled for the deployment. Returns 201 with the created agent. Returns 403 if you’re at the agent limit.

Get agent details

Response includes agent, processStatus, skills, secrets, snapshots, and portForwarding.

Restart the gateway

Run a shell command

Returns { stdout, stderr, exitCode, command, timestamp }.

Read a file

Upload a file

Returns { path, filename, size }. File limit matches the read endpoint (a few MB).

Snapshot now

Reset to a snapshot

Read the latest logs

Returns the last 100 lines as a single string.

Validate manifest / config

Files

Custom Domains

See Routes & Domains for the full workflow.

Devices

Streaming logs

The Logs tab streams over WebSocket on the agent’s subdomain:
Each message is a JSON object: { timestamp, level, source, message }. Filter on the client by level (TRACEFATAL) and free-text on message.

Error Format

Errors return JSON with a single error field:
Status codes follow HTTP semantics - 400 for validation, 401 for missing auth, 403 for plan/permission issues, 404 for missing resources, 409 for conflicts (duplicate secret name, both subdomain and customDomain provided, etc.), 413 for upload size, 500 for internal failures, 503 when an upstream (Convex, Pinata storage) is unreachable. See Errors for the full code-by-code reference.

Endpoint Quick Reference

Compact index of every endpoint, grouped by purpose. JWT = Pinata JWT, GW = gateway token (per-agent host). All paths under agents.pinata.cloud.

Agents

Auth

Secrets

Skills

Channels

Routes & domains

Tasks

Files & snapshots

Console

Devices

Config (engine runtime)

Note config/validate validates runtime config, not manifest.json. OpenClaw agents use /home/node/.openclaw/openclaw.json; Hermes agents use /home/hermes/data/config.yaml. To validate a manifest, use POST /v0/templates/validate or run pinata agents templates validate.

Templates

Git Smart HTTP

OpenAPI Spec

For everything not covered here:
The OpenAPI spec is the authoritative source - schemas, query parameters, response codes, and per-endpoint descriptions.