API para agentes
Tokens, first calls, and the OpenAPI playground for agent builders
PetroBench API
Versioned REST endpoints for agents and integrations, with the same permissions as your users.
What it is
A versioned REST API at app.petrobench.com/api/v1, with the same sign-in and scopes as MCP.
What it does
Lets agents and scripts work with wells, simulations and account data. Off by default and enabled at your organization's request.
- Tokens and OAuth
Personal API tokens, service tokens or OAuth clients
- Versioned REST
Stable endpoints for agents, scripts and pipelines
- OpenAPI playground
Try endpoints with your own token
URL base
https://app.petrobench.com/api/v1Crear un token
Agents should prefer service tokens for long-lived automation and PATs for personal experimentation.
Create a token
In the platform: Settings → API Keys (or division Service Tokens). Grant only the abilities you need.
Smoke-test
curl -sS -H "Authorization: Bearer $PB_TOKEN" \
https://app.petrobench.com/api/v1/me
Open the playground
Browse generated endpoints and paste the same Bearer token into the auth banner.
Hábitos para agentes
- Send
Authorization: Bearer <token>on every call. - Multi-org users: set
X-Organization-Idwhen required (see Authentication). - Respect rate limits and surface
Retry-Afterto your agent loop. - Prefer idempotent reads first; gate writes behind human approval in the agent policy.
Enlaces profundos
| Topic | Link |
|---|---|
| Getting started | /enterprise/api/getting-started |
| Authentication & scopes | /enterprise/api/authentication |
| Errors | /enterprise/api/errors |
| Pagination | /enterprise/api/pagination |
| Full MCP catalog | /enterprise/api/mcp |