Playground API
The Playground API manages project-scoped model comparison canvases. A Playground holds durable Agents (one per comparison column), and each Agent can launch immutable Executions. Every Agent execution runs model calls through the Gateway; available tools come from the connected MCP tool gateway, and executions inherit Gateway routing, guardrails, and trace capture.
Note
The Playground model traffic uses the same Gateway resolution as production traffic; it does not accept caller-supplied upstream model credentials.
Base URL:
https://api.provon.dev/v1Authentication#
Playground routes are project-qualified. Each route accepts either an API-key capability or the
corresponding signed-in project permission: writes require models:manage (API key) or
project:data:write (signed-in user); reads require workspace:read (API key) or
project:data:read (signed-in user).
Objects#
| Object | Meaning |
|---|---|
Playground |
A project-scoped comparison canvas with a label and a canvas-wide set of enabled tools. |
Agent |
A durable, editable comparison column: a model, a request template, and execution limits. |
Execution |
One immutable attempt to run an Agent, with an append-only event trace. |
Playgrounds#
| Method | Path | Purpose |
|---|---|---|
GET |
/v1/projects/:projectId/playgrounds |
List Playgrounds |
POST |
/v1/projects/:projectId/playgrounds |
Create a Playground |
GET |
/v1/projects/:projectId/playgrounds/:playgroundId |
Read one Playground with its Agents |
PATCH |
/v1/projects/:projectId/playgrounds/:playgroundId |
Update label or enabled_tool_names |
DELETE |
/v1/projects/:projectId/playgrounds/:playgroundId |
Delete Playground |
Create a Playground:
curl -X POST "$PROVON_API_URL/projects/$PROJECT_ID/playgrounds" \
-H "Authorization: Bearer $PROVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"label": "Compare reasoning models", "enabled_tool_names": ["web_search"]}'enabled_tool_names is canvas-scoped: every Agent in the Playground runs against the same tool set,
so a comparison differs only in the model and request. Omit it to accept the deployment default.
Tools#
| Method | Path | Purpose |
|---|---|---|
GET |
/v1/projects/:projectId/playgrounds/:playgroundId/tools |
List tools available to this canvas. |
Agents#
| Method | Path | Purpose |
|---|---|---|
POST |
/v1/projects/:projectId/playgrounds/:playgroundId/agents |
Create an Agent column |
PATCH |
/v1/projects/:projectId/playgrounds/:playgroundId/agents/:agentId |
Update model, request, or execution_limits |
DELETE |
/v1/projects/:projectId/playgrounds/:playgroundId/agents/:agentId |
Delete an Agent |
Create an Agent:
curl -X POST "$PROVON_API_URL/projects/$PROJECT_ID/playgrounds/$PLAYGROUND_ID/agents" \
-H "Authorization: Bearer $PROVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5-mini",
"request": {
"system_prompt": "You are a helpful assistant.",
"messages": [
{ "role": "user", "content": "What is 2 + 2?" }
],
"params": {
"temperature": 0.5,
"max_tokens": 256
}
}
}'Agent fields:
| Field | Type | Notes |
|---|---|---|
model |
string | Required. Any Gateway-resolvable model such as openai/gpt-5-mini. |
request |
object | Required. Contains system_prompt, messages, params. |
execution_limits |
object | Optional. Bounds on steps, tool calls, duration, and tool output. |
messages use { "role": "system" | "user" | "assistant", "content": "..." } objects.
params supports temperature, top_p, and max_tokens (each nullable).
execution_limits bounds (defaults shown):
| Field | Default | Range |
|---|---|---|
max_steps |
8 |
1–32 |
max_tool_calls |
12 |
0–64 |
timeout_ms |
120000 |
1000–600000 |
max_tool_result_chars |
50000 |
1000–200000 |
Executions#
| Method | Path | Purpose |
|---|---|---|
GET |
/v1/projects/:projectId/playgrounds/:playgroundId/agents/:agentId/executions |
List Executions for an Agent |
POST |
/v1/projects/:projectId/playgrounds/:playgroundId/agents/:agentId/executions |
Start an Execution; response is an SSE stream of events. |
GET |
/v1/projects/:projectId/playgrounds/:playgroundId/executions/:executionId |
Read one Execution with its event trace. |
POST |
/v1/projects/:projectId/playgrounds/:playgroundId/executions/:executionId/cancel |
Cancel a running Execution. |
Starting an Execution streams Server-Sent Events (event: <kind>\ndata: <json>). Event kinds
include execution.started, model.started, model.completed, tool.call.started,
tool.call.completed, tool.call.failed, assistant.output, execution.completed,
execution.failed, execution.limit_reached, and execution.cancelled. A final done event
carries the finished Execution record.
Execution statuses are queued, running, completed, failed, cancelled, and
limit_reached. The Execution record exposes a snapshot (model, request, tools, limits), metrics
(model_calls, tool_calls, duration_ms), final_output, and error.
Instant Execution#
For a one-off comparison without persisting an Agent:
| Method | Path | Purpose |
|---|---|---|
POST |
/v1/projects/:projectId/playgrounds/instant-executions |
Stateless passthrough to Gateway /v1/chat/completions. |
curl -X POST "$PROVON_API_URL/projects/$PROJECT_ID/playgrounds/instant-executions" \
-H "Authorization: Bearer $PROVON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5-mini",
"request": {
"messages": [{"role": "user", "content": "What is 2 + 2?"}],
"params": { "max_tokens": 256 }
},
"stream": true
}'The body uses the same request shape as an Agent column: { system_prompt?, messages, params },
plus the top-level model and optional stream. The endpoint folds system_prompt into the
messages array and spreads params onto the Gateway /v1/chat/completions request. The response is
the raw Gateway response; set stream: true to receive the upstream SSE stream. Errors surface as
502 gateway_execution_failed.
Errors#
Playground errors use either the common API error envelope or a compact { error, message } body.
| Status | Meaning |
|---|---|
400 |
Invalid request body or missing field |
401 |
Missing or invalid credential |
403 |
Credential lacks capability/permission |
404 |
Playground, Agent, or Execution not found |
502 |
Gateway execution failed |