Cloudflare R2 Multipart Upload API
The Multipart Upload API from Cloudflare R2 — 4 operation(s) for multipart upload.
The Multipart Upload API from Cloudflare R2 — 4 operation(s) for multipart upload.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/cloudflare-r2-multipart-upload-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Cloudflare R2 S3-Compatible Multipart Upload API
description: 'An S3-compatible REST API for storing and retrieving objects in Cloudflare R2 buckets. Supports core S3 operations including bucket management, object CRUD, multipart uploads, CORS configuration, lifecycle policies, and server-side encryption. Compatible with AWS S3 SDKs across Python, JavaScript, Go, Java, PHP, Ruby, and Rust. Base URL format: https://<ACCOUNT_ID>.r2.cloudflarestorage.com
'
version: 1.0.0
termsOfService: https://www.cloudflare.com/website-terms/
contact:
name: Cloudflare R2 Documentation
url: https://developers.cloudflare.com/r2/api/s3/api/
servers:
- url: https://{account_id}.r2.cloudflarestorage.com
description: Cloudflare R2 S3-compatible endpoint
variables:
account_id:
description: Your Cloudflare account ID
default: YOUR_ACCOUNT_ID
security:
- hmacAuth: []
tags:
- name: Multipart Upload
paths:
/{bucket}/{key}?uploads:
post:
operationId: create-multipart-upload
summary: Create Multipart Upload
description: Initiates a multipart upload and returns an upload ID.
tags:
- Multipart Upload
parameters:
- name: bucket
in: path
required: true
schema:
type: string
- name: key
in: path
required: true
schema:
type: string
- name: Content-Type
in: header
required: false
schema:
type: string
- name: x-amz-meta-*
in: header
required: false
schema:
type: string
description: User-defined metadata headers
responses:
'200':
description: Multipart upload initiated
content:
application/xml:
schema:
$ref: '#/components/schemas/InitiateMultipartUploadResult'
4XX:
description: Error
content:
application/xml:
schema:
$ref: '#/components/schemas/Error'
/{bucket}/{key}?partNumber={partNumber}&uploadId={uploadId}:
put:
operationId: upload-part
summary: Upload Part
description: Uploads a part in a multipart upload.
tags:
- Multipart Upload
parameters:
- name: bucket
in: path
required: true
schema:
type: string
- name: key
in: path
required: true
schema:
type: string
- name: partNumber
in: path
required: true
schema:
type: integer
minimum: 1
maximum: 10000
description: Part number (1 to 10000)
- name: uploadId
in: path
required: true
schema:
type: string
description: Upload ID from CreateMultipartUpload
- name: x-amz-copy-source
in: header
required: false
schema:
type: string
description: Source for UploadPartCopy
- name: x-amz-copy-source-range
in: header
required: false
schema:
type: string
description: Byte range for UploadPartCopy
requestBody:
required: false
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: Part uploaded
headers:
ETag:
schema:
type: string
4XX:
description: Error
content:
application/xml:
schema:
$ref: '#/components/schemas/Error'
/{bucket}/{key}?uploadId={uploadId}:
post:
operationId: complete-multipart-upload
summary: Complete Multipart Upload
description: Completes a multipart upload by assembling previously uploaded parts.
tags:
- Multipart Upload
parameters:
- name: bucket
in: path
required: true
schema:
type: string
- name: key
in: path
required: true
schema:
type: string
- name: uploadId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/CompleteMultipartUpload'
responses:
'200':
description: Multipart upload completed
content:
application/xml:
schema:
$ref: '#/components/schemas/CompleteMultipartUploadResult'
4XX:
description: Error
content:
application/xml:
schema:
$ref: '#/components/schemas/Error'
delete:
operationId: abort-multipart-upload
summary: Abort Multipart Upload
description: Aborts a multipart upload and frees any storage consumed by the upload.
tags:
- Multipart Upload
parameters:
- name: bucket
in: path
required: true
schema:
type: string
- name: key
in: path
required: true
schema:
type: string
- name: uploadId
in: path
required: true
schema:
type: string
responses:
'204':
description: Multipart upload aborted
4XX:
description: Error
content:
application/xml:
schema:
$ref: '#/components/schemas/Error'
get:
operationId: list-parts
summary: List Parts
description: Lists the parts that have been uploaded for a specific multipart upload.
tags:
- Multipart Upload
parameters:
- name: bucket
in: path
required: true
schema:
type: string
- name: key
in: path
required: true
schema:
type: string
- name: uploadId
in: path
required: true
schema:
type: string
- name: max-parts
in: query
required: false
schema:
type: integer
default: 1000
description: Maximum number of parts to return
- name: part-number-marker
in: query
required: false
schema:
type: integer
description: Part number after which listing begins
responses:
'200':
description: Parts list
content:
application/xml:
schema:
$ref: '#/components/schemas/ListPartsResult'
4XX:
description: Error
content:
application/xml:
schema:
$ref: '#/components/schemas/Error'
/{bucket}?uploads:
get:
operationId: list-multipart-uploads
summary: List Multipart Uploads
description: Lists in-progress multipart uploads in a bucket.
tags:
- Multipart Upload
parameters:
- name: bucket
in: path
required: true
schema:
type: string
- name: prefix
in: query
required: false
schema:
type: string
- name: delimiter
in: query
required: false
schema:
type: string
- name: max-uploads
in: query
required: false
schema:
type: integer
default: 1000
- name: key-marker
in: query
required: false
schema:
type: string
- name: upload-id-marker
in: query
required: false
schema:
type: string
responses:
'200':
description: Multipart uploads list
content:
application/xml:
schema:
$ref: '#/components/schemas/ListMultipartUploadsResult'
4XX:
description: Error
content:
application/xml:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Error:
type: object
properties:
Code:
type: string
description: Error code
Message:
type: string
description: Human-readable error message
Resource:
type: string
description: The resource that caused the error
RequestId:
type: string
description: The request ID for troubleshooting
xml:
name: Error
ListPartsResult:
type: object
properties:
Bucket:
type: string
Key:
type: string
UploadId:
type: string
PartNumberMarker:
type: integer
NextPartNumberMarker:
type: integer
MaxParts:
type: integer
IsTruncated:
type: boolean
Part:
type: array
items:
type: object
properties:
PartNumber:
type: integer
LastModified:
type: string
format: date-time
ETag:
type: string
Size:
type: integer
format: int64
xml:
name: ListPartsResult
InitiateMultipartUploadResult:
type: object
properties:
Bucket:
type: string
Key:
type: string
UploadId:
type: string
xml:
name: InitiateMultipartUploadResult
CompleteMultipartUpload:
type: object
properties:
Part:
type: array
items:
type: object
required:
- PartNumber
- ETag
properties:
PartNumber:
type: integer
ETag:
type: string
xml:
name: CompleteMultipartUpload
ListMultipartUploadsResult:
type: object
properties:
Bucket:
type: string
KeyMarker:
type: string
UploadIdMarker:
type: string
NextKeyMarker:
type: string
NextUploadIdMarker:
type: string
MaxUploads:
type: integer
IsTruncated:
type: boolean
Upload:
type: array
items:
type: object
properties:
Key:
type: string
UploadId:
type: string
Initiated:
type: string
format: date-time
xml:
name: ListMultipartUploadsResult
CompleteMultipartUploadResult:
type: object
properties:
Location:
type: string
Bucket:
type: string
Key:
type: string
ETag:
type: string
xml:
name: CompleteMultipartUploadResult
securitySchemes:
hmacAuth:
type: apiKey
in: header
name: Authorization
description: 'AWS Signature Version 4 authentication. Use your R2 API token (Access Key ID and Secret Access Key) generated from the R2 dashboard. Compatible with all AWS S3 SDKs.
'
externalDocs:
description: Cloudflare R2 S3 API Compatibility
url: https://developers.cloudflare.com/r2/api/s3/api/