Overview
The PV API is a JSON REST API. All requests use HTTPS, and request and response bodies are JSON. Your base URL is provided with your API credentials; examples below use $PV_API_URL.
New to PV? Start with the Documentation.
Endpoints, parameters, and responses for the PV REST API.
Last updated: October 3, 2026
The PV API is a JSON REST API. All requests use HTTPS, and request and response bodies are JSON. Your base URL is provided with your API credentials; examples below use $PV_API_URL.
New to PV? Start with the Documentation.
Authenticate every request with your API key as a bearer token. Requests without a valid key return 401.
Authorization: Bearer $PV_API_KEYA unique name for the agent.
What the agent should do and how.
Model to use. Defaults to "auto" (PV picks per step).
Scopes the agent may use. Defaults to none.
{
"id": "agt_123",
"name": "invoice-reconciler",
"model": "auto",
"permissions": ["integrations:accounting:read", "files:write"],
"created_at": "2026-10-03T09:00:00Z"
}Deletes the agent. Running tasks are cancelled; past tasks and audit entries are kept. Returns 204.
The agent that should run the task.
The goal or instructions for this task.
Your own key–value data, returned with the task.
{
"id": "tsk_456",
"agent_id": "agt_123",
"status": "queued",
"created_at": "2026-10-03T09:01:00Z"
}Returns the task with its current status: queued, running, succeeded, failed, or cancelled. When finished, output holds the result.
{
"id": "tsk_456",
"status": "succeeded",
"output": "Reconciled 128 invoices. 3 mismatches flagged.",
"started_at": "2026-10-03T09:01:02Z",
"finished_at": "2026-10-03T09:04:40Z"
}Opens a server-sent events stream of the task's progress. Event types are step, tool_call, output, and completed. The stream closes after completed.
Stops a queued or running task. Returns the task with status cancelled.
Only entries for this agent.
Only entries for this task.
Only entries after this time.
List endpoints accept limit (1–100, default 20) and cursor. Pass the next_cursor from a response to get the next page; it is null on the last page.
Errors use standard HTTP status codes and a consistent body:
{
"error": {
"code": "not_found",
"message": "No task with id tsk_999."
}
}The request body or parameters are invalid.
The API key is missing or invalid.
The key or agent lacks the required permission.
The resource does not exist.
Too many requests. Retry after the Retry-After header.
Something went wrong on our side. Safe to retry.