Introduction
Welcome to the Pletor API documentation.
Integrate Pletor's AI capabilities directly into your apps and workflows — agent discovery, on-brand asset generation, and real-time execution tracking.
Key Features
Agent Discovery — Browse a catalog of AI agents with detailed descriptions, required inputs, and expected outputs.
App Discovery — Browse curated, runnable apps built on top of flows. Apps are an alternative to agents: run them via
POST /app-runswith anapp_id.Flexible Execution — Create agent runs via
POST /runsand app runs viaPOST /app-runs, providing dynamic inputs including uploaded files.Asset Management — Centralized handling for your files: upload, retrieve, and share assets easily.
Real-Time Tracking — Monitor executions with live updates and retrieve results as soon as they're ready.
Secure API Access — All endpoints are protected with API key authentication.
Authentication
All requests require either an API key in the X-Api-Key header, or a Bearer JWT in the Authorization header.
Rate Limits
Rate limits are per API key:
Default: 2000 requests/minute
POST /runs and POST /app-runs: 600 requests/minute
POST /assets/upload: 600 requests/minute
Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.
Idempotent requests
Network calls fail halfway, and a blind retry can start a second run (charging you twice) or upload the same file again. To retry safely, attach an external_id to any POST and reuse the same value on the retry.
The first request with a key creates the object and returns it, with
external_idechoed back.Any later request that reuses the key returns
409 conflictinstead of creating a duplicate. Fetch the original withGET /runs?external_id=...(the same filter works on/app-runsand/assets).GETandDELETEdon't take a key; repeating those is already safe.
A key is unique per organization and permanent. Once it has created a run or an upload it stays claimed, even if the run later fails or is canceled, so a genuine re-run needs a new key. Runs and uploads are tracked separately, so the same value can label one run and one upload but not two of either.
Generate your own key. A v4 UUID is a good default; keys can be up to 255 characters, and a longer one is rejected with 422. Keep sensitive data out of it, since it appears in responses. A request that fails validation before the object is created (bad inputs, an oversized key) claims nothing, so you can fix it and retry with the same key.
Quickstart
List agents or apps —
GET /agentsorGET /appsto find one that fits your use case.Inspect inputs —
GET /agents/{id}orGET /apps/{id}to see required inputs and expected outputs.Upload assets (if needed) —
POST /assets/upload.Create a run —
POST /runswith anagent_idfor agents, orPOST /app-runswith anapp_idfor apps, plus inputs.Poll status —
GET /runs/{run_id}(agent runs) orGET /app-runs/{run_id}(app runs) until completed.Handle human review (agent runs, if applicable) — when
awaiting_human_reviewistrue, resolve each entry inpending_reviewsviaPOST /runs/{run_id}/reviews/{review_id}to resume execution.Retrieve outputs — inspect the completed run's
resultsarray to find generatedasset_ids and text outputs.Download assets —
GET /assets/{asset_id}/download.
Last updated

