| Export | Route | Use it to |
|---|---|---|
| OpenAPI 3.1 spec | GET /v1/apis/{api_id}/exports/openapi | Bootstrap a typed SDK, import into Postman, Insomnia, or Stoplight, or register the API with a third-party gateway. |
| MCP tool manifest | GET /v1/apis/{api_id}/exports/mcp | Register the API’s endpoints as tools in an MCP-compatible agent runtime that cannot talk to the hosted Peel MCP server directly. |
X-API-Key. Signed-in browser sessions are also accepted by the same routes. Exports succeed only after Peel has published exportable endpoints; failed or still-building APIs return API_NOT_EXPORTABLE with a pointer back to API detail or health diagnostics.
CLI equivalent:
Download the OpenAPI spec
servers: points at the API-specific execution base, for example/v1/apis/{api_id}/endpointsin hosted exports. Generated clients resolve endpoint paths relative to that base.paths: one relative call path per endpoint, for example/list_products:call, with the compiledinput_schemaas the request body and theExecutionEnvelopeas the response shape. Hosted call operations usePOSTeven when the compiled transport talks to the source site withGET; inspectx-target-methodwhen you need the compiled transport method. Operation extensions also exposex-endpoint-name,x-endpoint-type,x-auth-requirement, runtime policy, and compact build-time verification metadata so SDK generators and agent registries do not need to infer the endpoint contract from the path.components.schemas: theinput_schema,output_schema, and normalized runtime envelope shapes Peel compiled for each endpoint. Public hosted exports describe the same sanitized call envelope returned by:call:status,status_code,data,error,error_code,execution_time, plus optional transport, session, and clippedraw_outputfields. API identity and auth capability fields live on the API detail and export metadata, not inside each endpoint call response body.security: declaresX-API-Keyas the required auth scheme.
Download the MCP manifest
readOnlyHint, destructiveHint, idempotentHint, and openWorldHint when they apply, plus compact public identity fields such as api_id, binding_id, version_id, and endpoint_name. Endpoint metadata includes rest_path plus rest_method: "POST" for the Peel-facing call route, target_method for the compiled transport method Peel uses against the source site, and the same compact runtime policy and verification metadata as OpenAPI exports. Use the manifest when you want to register Peel’s endpoints as tools in an agent runtime that you host yourself, for example, a custom LangChain agent that cannot connect to https://api.peel.sh/mcp directly.
For most MCP use cases, connect to the hosted MCP server instead. See MCP server. Export is mainly for offline, self-hosted, or air-gapped agent setups, or for runtimes that can consume a manifest but cannot talk to https://api.peel.sh/mcp directly.
When to re-export
The exports reflect the API’s current published version. After a successfulrevise or rebuild, the version_id changes and the exported spec will likely differ. Re-export whenever:
- you merge a
revisethat changed endpoint names, input schemas, or output shapes - a
rebuildrecompiled the transport (version_idbefore and after can confirm this) - you want to pin a generated client to a specific Peel version
Exports are read-only snapshots. They do not include credentials or any
session_required session state. They describe the compiled contract, not the runtime execution environment.Related pages
- How it works: the build lifecycle that produces these exports
- MCP server: the hosted MCP surface, which serves the same endpoints live
- API updates: when a rebuild or revise changes what the export contains