R2 Connect API
OpenAPI spec
Download the API contract in OpenAPI 3.1 format to generate clients or import it into your tools.
We publish the complete R2 Connect API contract as an OpenAPI 3.1 document. With it you can generate a client in your language, import it into your testing tool or hand it to your own development tooling.
bash
# Download the spec
curl -O https://r2developers.com/openapi.json
# Generate a client (example with OpenAPI Generator)
openapi-generator-cli generate \
-i https://r2developers.com/openapi.json \
-g typescript-fetch \
-o ./r2-clientFor AI tooling#
This documentation is also published in plain text so assistants and agents can consume it without parsing HTML:
- /llms.txt — portal index
- /llms-full.txt — the whole documentation in a single file
- /openapi.json — the API contract