logo

Cloudflare API

Overview
Endpoints
AI Gateway
API Shield API Discovery
API Shield Client Certificates for a Zone
API Shield Endpoint Management
API Shield Schema Validation 2.0
API Shield Settings
API Shield WAF Expression Templates
API Token Permission Groups
ASN Intelligence
Access Bookmark applications (Deprecated)
Access application-scoped policies
Access applications
Access authentication logs
Access custom pages
Access groups
Access identity providers
Access key configuration
Access mTLS authentication
Access policy tester
Access reusable policies
Access service tokens
Access short-lived certificate CAs
Access tags
Account Billing Profile
Account Load Balancer Monitors
Account Load Balancer Pools
Account Load Balancer Search
Account Members
Account Permission Groups
Account Request Tracer
Account Resource Groups
Account Roles
Account Rulesets
Account Subscriptions
Account-Level Custom Nameservers
Account-Level Custom Nameservers Usage for a Zone
Accounts
Analyze Certificate
Argo Analytics for Geolocation
Argo Analytics for Zone
Argo Smart Routing
Audit Logs
Automatic SSL/TLS
Available Page Rules settings
Bot Settings
Botnet Threat Feed
Calls Apps
Calls TURN Keys
Certificate Packs
Cloudflare IPs
Cloudflare Images
List images
get
Upload an image
post
Images usage statistics
get
Delete image
delete
Image details
get
Update image
patch
Base image
get
List images V2
get
Create authenticated direct upload URL V2
post
Cloudflare Images Keys
Cloudflare Images Variants
Cloudflare Tunnel
Cloudflare Tunnel Configuration
Custom Hostname Fallback Origin for a Zone
Custom Hostname for a Zone
Custom Indicator Feeds
Custom SSL for a Zone
Custom pages for a zone
Custom pages for an account
D1
DCV Delegation
DEX Synthetic Application Monitoring
DLP Datasets
DLP Profiles
DLP Settings
DLS Regional Services
DNS Analytics
DNS Firewall
DNS Firewall Analytics
DNS Records for a Zone
DNS Settings for a Zone
DNS Settings for an Account
DNSSEC
Device DEX Tests
Device Managed Networks
Device Posture Integrations
Device posture rules
Devices
Diagnostics
Domain History
Domain Intelligence
Durable Objects Namespace
Email Routing destination addresses
Email Routing routing rules
Email Routing settings
Email Security
Email Security Settings
Filters
Firewall rules
Health Checks
Hyperdrive
IP Access rules for a user
IP Access rules for a zone
IP Access rules for an account
IP Address Management Address Maps
IP Address Management BGP Prefixes
IP Address Management Dynamic Advertisement
IP Address Management Prefix Delegation
IP Address Management Prefixes
IP Address Management Service Bindings
IP Intelligence
IP List
Infrastructure Access Targets
Instant Logs jobs for a zone
Keyless SSL for a Zone
Lists
Load Balancer Healthcheck Events
Load Balancer Monitors
Load Balancer Pools
Load Balancer Regions
Load Balancers
Logcontrol CMB config for an account
Logpush jobs for a zone
Logpush jobs for an account
Logs Received
Magic Account Apps
Magic Connectors
Magic GRE tunnels
Magic IPsec tunnels
Magic Interconnects
Magic Network Monitoring Configuration
Magic Network Monitoring Rules
Magic PCAP collection
Magic Site ACLs
Magic Site App Configs
Magic Site LANs
Magic Site WANs
Magic Sites
Magic Static Routes
Managed Transforms
Miscategorization
Notification Alert Types
Notification History
Notification Mechanism Eligibility
Notification destinations with PagerDuty
Notification policies
Notification webhooks
Observatory
Origin CA
Origin Post-Quantum
Page Rules
Page Shield
Pages Build Cache
Pages Deployment
Pages Domains
Pages Project
Passive DNS by IP
Per-Hostname TLS Settings
Per-hostname Authenticated Origin Pull
Phishing URL Information
Phishing URL Scanner
Priority Intelligence Requirements (PIR)
Queue
R2 Bucket
Radar AI Bots
Radar AS112
Radar Annotations
Radar Attacks
Radar BGP
Radar DNS
Radar Datasets
Radar Email Routing
Radar Email Security
Radar Entities
Radar Http
Radar Netflows
Radar Quality
Radar Ranking
Radar Search
Radar TCP Resets Timeouts
Radar Traffic Anomalies
Radar Verified Bots
Rate limits for a zone
Registrar Domains
Request for Information (RFI)
SSL Verification
SSL/TLS Mode Recommendation
Secondary DNS (ACL)
Secondary DNS (Peer)
Secondary DNS (Primary Zone)
Secondary DNS (Secondary Zone)
Secondary DNS (TSIG)
Security Center Insights
Sinkhole Config
Smart Tiered Cache
Spectrum Analytics
Spectrum Applications
Stream Audio Tracks
Stream Live Inputs
Stream MP4 Downloads
Stream Signing Keys
Stream Subtitles/Captions
Stream Video Clipping
Stream Videos
Stream Watermark Profile
Stream Webhook
Tiered Caching
Total TLS
Tunnel Routing
Tunnel Virtual Network
Turnstile
URL Normalization
URL Scanner
URL Scanner (Beta)
Universal SSL Settings for a Zone
User
User API Tokens
User Agent Blocking rules
User Billing History
User Billing Profile
User Subscription
User's Account Memberships
User's Invites
User's Organizations
Vectorize
Vectorize Beta (Deprecated)
WAF overrides
WAF packages
WAF rule groups
WAF rules
WHOIS Record
Waiting Room
Web Analytics
Web3 Hostname
Worker Account Settings
Worker Binding (Deprecated)
Worker Cron Trigger
Worker Deployments
Worker Deployments (Deprecated)
Worker Domain
Worker Environment
Worker Filters (Deprecated)
Worker Routes
Worker Script
Worker Script (Deprecated)
Worker Subdomain
Worker Tail Logs
Worker Versions
Workers AI
Workers AI Automatic Speech Recognition
Workers AI Finetune
Workers AI Image Classification
Workers AI Object Detection
Workers AI Summarization
Workers AI Text Classification
Workers AI Text Embeddings
Workers AI Text Generation
Workers AI Text To Image
Workers AI Translation
Workers KV Namespace
Workers KV Request Analytics
Workers KV Stored Data Analytics
Workers for Platforms
Zaraz
Zero Trust Audit SSH Settings
Zero Trust Connectivity Settings
Zero Trust Gateway application and application type mappings
Zero Trust Gateway categories
Zero Trust Gateway locations
Zero Trust Gateway proxy endpoints
Zero Trust Gateway rules
Zero Trust Risk Scoring
Zero Trust Risk Scoring Integrations
Zero Trust accounts
Zero Trust certificates
Zero Trust lists
Zero Trust organization
Zero Trust seats
Zero Trust users
Zone
Zone Analytics (Deprecated)
Zone Cache Settings
Zone Cloud Connector Rules GET
Zone Cloud Connector Rules PUT
Zone Holds
Zone Lockdown
Zone Rate Plan
Zone Rulesets
Zone Settings
Zone Snippets
Zone Subscription
Zone-Level Access applications
Zone-Level Access groups
Zone-Level Access identity providers
Zone-Level Access mTLS authentication
Zone-Level Access policies
Zone-Level Access service tokens
Zone-Level Access short-lived certificate CAs
Zone-Level Authenticated Origin Pulls
Zone-Level Zero Trust organization
mTLS Certificate Management
security.txt
powered by Stoplight

Upload an image

post
https://api.cloudflare.com/client/v4
/accounts/{account_id}/images/v1

Upload an image with up to 10 Megabytes using a single HTTP POST (multipart/form-data) request. An image can be uploaded by sending an image file or passing an accessible to an API url.

account_id
string
read-onlyrequired

Account identifier tag.

<= 32 characters
Example:
023e105f4ecef8ad9ca31a8372d0c353
file

An image binary data. Only needed when type is uploading a file.

metadata
object

User modifiable key-value store. Can use used for keeping references to another system of record for managing images.

requireSignedURLs
boolean

Indicates whether the image requires a signature token for the access.

Default:
false
Example:
true
url
string

A URL to fetch an image from origin. Only needed when type is uploading from a URL.

Example:
https://example.com/path/to/logo.png

Upload an image response

result
required
filename
string

Image file name.

<= 255 characters
Example:
logo.png
id
string

Image unique identifier.

<= 32 characters
Example:
107b9558-dd06-4bbd-5fef-9c2c16bb7900
meta
object

User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes.

Example:
{"key":"value"}
requireSignedURLs
boolean

Indicates whether the image can be a accessed only using it's UID. If set to true, a signed token needs to be generated with a signing key to view the image.

Default:
false
Example:
true
uploaded
string<date-time>

When the media item was uploaded.

Example:
2014-01-02T02:20:00.123Z
variants

URI to thumbnail variant for an image.

Example:
["https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/thumbnail","https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/hero","https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/original"]
errors
array[object]
required
Example:
[]
code
integer
required
>= 1000
message
string
required
messages
array[object]
required
Example:
[]
code
integer
required
>= 1000
message
string
required
success
boolean
required

Whether the API call was successful

Allowed value:
true
Example:
true
Auth
:
Parameters
:
Body
:
:
:
:
curl --request POST \
--url https://api.cloudflare.com/client/v4/accounts/account_id/images/v1 \
--header 'Authorization: Bearer undefined' \
--header 'Content-Type: multipart/form-data' \
--form file= \
--form metadata= \
--form requireSignedURLs= \
--form url=
Response Example
1
{
2
"errors": [],
3
"messages": [],
4
"result": {
5
"filename": "logo.png",
6
"id": "107b9558-dd06-4bbd-5fef-9c2c16bb7900",
7
"meta": {
8
"key": "value"
9
},
10
"requireSignedURLs": true,
11
"uploaded": "2014-01-02T02:20:00.123Z",
12
"variants": [
13
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/thumbnail",
14
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/hero",
15
"https://imagedelivery.net/MTt4OTd0b0w5aj/107b9558-dd06-4bbd-5fef-9c2c16bb7900/original"
16
]
17
},
18
"success": true
19
}