ImageKit Origins API
The Origins API from ImageKit — 2 operation(s) for origins.
The Origins API from ImageKit — 2 operation(s) for origins.
openapi: 3.0.3
info:
title: ImageKit Account Management API Origins API
version: 1.0.0
description: Checkout [API overview](/docs/api-overview) to learn about ImageKit's APIs, authentication, rate limits, and error codes etc.
contact:
email: developer@imagekit.io
name: ImageKit Team
url: https://imagekit.io
termsOfService: https://imagekit.io/terms/
servers:
- url: https://api.imagekit.io
security:
- basicAuth: []
tags:
- name: Origins
paths:
/v1/accounts/origins:
get:
summary: List origins
tags:
- Origins
operationId: list-origins
description: "**Note:** This API is currently in beta. \nReturns an array of all configured origins for the current account.\n"
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OriginResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimitExceeded'
post:
summary: Create origin
tags:
- Origins
operationId: create-origin
description: "**Note:** This API is currently in beta. \nCreates a new origin and returns the origin object.\n"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OriginRequest'
responses:
'201':
description: Origin created successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/OriginResponse'
'400':
description: Bad request. The request body is invalid.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Invalid origin type. Must be one of S3, S3_COMPATIBLE, CLOUDINARY_BACKUP, WEB_FOLDER, WEB_PROXY, GCS, AZURE_BLOB, AKENEO_PIM.
- name is required and must be a string
- bucket is required and must be a string
help:
type: string
example: For support kindly contact us at support@imagekit.io.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimitExceeded'
/v1/accounts/origins/{id}:
get:
summary: Get origin
tags:
- Origins
operationId: get-origin
description: "**Note:** This API is currently in beta. \nRetrieves the origin identified by `id`.\n"
parameters:
- in: path
name: id
schema:
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/OriginResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Origin not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
'429':
$ref: '#/components/responses/RateLimitExceeded'
put:
summary: Update origin
tags:
- Origins
operationId: update-origin
description: "**Note:** This API is currently in beta. \nUpdates the origin identified by `id` and returns the updated origin object.\n"
parameters:
- in: path
name: id
schema:
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OriginRequest'
responses:
'200':
description: Origin updated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/OriginResponse'
'400':
description: Bad request. The request body is invalid.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Invalid origin type. Must be one of S3, S3_COMPATIBLE, CLOUDINARY_BACKUP, WEB_FOLDER, WEB_PROXY, GCS, AZURE_BLOB, AKENEO_PIM.
- name is required and must be a string
- bucket is required and must be a string
help:
type: string
example: For support kindly contact us at support@imagekit.io.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Origin not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
'429':
$ref: '#/components/responses/RateLimitExceeded'
delete:
summary: Delete origin
tags:
- Origins
operationId: delete-origin
description: "**Note:** This API is currently in beta. \nPermanently removes the origin identified by `id`. If the origin is in use by any URL‑endpoints, the API will return an error.\n"
parameters:
- in: path
name: id
schema:
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
responses:
'204':
description: Origin deleted successfully.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Origin not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
'429':
$ref: '#/components/responses/RateLimitExceeded'
components:
schemas:
OriginRequest:
title: Origin request
description: Schema for origin request resources.
example:
name: My S3 Origin
type: S3
bucket: test-bucket
prefix: images
accessKey: AKIATEST123
secretKey: secrettest123
discriminator:
propertyName: type
oneOf:
- title: S3
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- S3
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
description: Path prefix inside the bucket.
example: raw-assets
default: ''
type: string
maxLength: 100
accessKey:
description: Access key for the bucket.
example: AKIAIOSFODNN7EXAMPLE
type: string
minLength: 1
maxLength: 100
secretKey:
description: Secret key for the bucket.
example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
type: string
minLength: 1
maxLength: 100
required:
- name
- type
- bucket
- accessKey
- secretKey
additionalProperties: false
- title: S3 Compatible
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- S3_COMPATIBLE
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
description: Path prefix inside the bucket.
example: raw-assets
default: ''
type: string
maxLength: 100
accessKey:
description: Access key for the bucket.
example: AKIAIOSFODNN7EXAMPLE
type: string
minLength: 1
maxLength: 100
secretKey:
description: Secret key for the bucket.
example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
type: string
minLength: 1
maxLength: 100
endpoint:
description: Custom S3-compatible endpoint.
example: https://s3.eu-central-1.wasabisys.com
type: string
format: uri
s3ForcePathStyle:
default: false
description: Use path-style S3 URLs?
example: true
type: boolean
required:
- name
- type
- bucket
- accessKey
- secretKey
- endpoint
additionalProperties: false
- title: Cloudinary Backup
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- CLOUDINARY_BACKUP
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
description: Path prefix inside the bucket.
example: raw-assets
default: ''
type: string
maxLength: 100
accessKey:
description: Access key for the bucket.
example: AKIAIOSFODNN7EXAMPLE
type: string
minLength: 1
maxLength: 100
secretKey:
description: Secret key for the bucket.
example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
type: string
minLength: 1
maxLength: 100
required:
- name
- type
- bucket
- accessKey
- secretKey
additionalProperties: false
- title: Web Folder
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- WEB_FOLDER
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
baseUrl:
description: Root URL for the web folder origin.
example: https://images.example.com/assets
type: string
format: uri
forwardHostHeaderToOrigin:
description: Forward the Host header to origin?
example: false
default: false
type: boolean
required:
- name
- type
- baseUrl
additionalProperties: false
- title: Web Proxy
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- WEB_PROXY
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
required:
- name
- type
additionalProperties: false
- title: Google Cloud Storage (GCS)
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- GCS
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
example: gcs-media
type: string
minLength: 1
maxLength: 100
prefix:
example: products
default: ''
type: string
maxLength: 100
clientEmail:
example: service-account@project.iam.gserviceaccount.com
type: string
format: email
pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
privateKey:
example: '-----BEGIN PRIVATE KEY-----\nMIIEv...'
type: string
minLength: 1
required:
- name
- type
- bucket
- clientEmail
- privateKey
additionalProperties: false
- title: Azure Blob Storage
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- AZURE_BLOB
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
container:
example: images
type: string
minLength: 1
maxLength: 100
prefix:
example: uploads
default: ''
type: string
maxLength: 100
accountName:
example: account123
type: string
minLength: 1
maxLength: 100
sasToken:
example: ?sv=2023-01-03&sr=c&sig=abc123
type: string
minLength: 1
required:
- name
- type
- container
- accountName
- sasToken
additionalProperties: false
- title: Akeneo PIM
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- AKENEO_PIM
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
baseUrl:
description: Akeneo instance base URL.
example: https://akeneo.company.com
type: string
format: uri
clientId:
description: Akeneo API client ID.
example: akeneo-client-id
type: string
minLength: 1
maxLength: 100
clientSecret:
description: Akeneo API client secret.
example: akeneo-client-secret
type: string
minLength: 1
maxLength: 100
username:
description: Akeneo API username.
example: integration-user
type: string
minLength: 1
maxLength: 100
password:
description: Akeneo API password.
example: strongpassword123
type: string
minLength: 1
maxLength: 100
required:
- name
- type
- baseUrl
- clientId
- clientSecret
- username
- password
additionalProperties: false
type: object
OriginResponse:
title: Origin Response
description: Origin object as returned by the API (sensitive fields removed).
discriminator:
propertyName: type
oneOf:
- title: S3
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- S3
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
type: string
description: Path prefix inside the bucket.
example: raw-assets
id:
readOnly: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- bucket
- prefix
- id
additionalProperties: false
- title: S3 Compatible
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- S3_COMPATIBLE
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
type: string
description: Path prefix inside the bucket.
example: raw-assets
endpoint:
description: Custom S3-compatible endpoint.
example: https://s3.eu-central-1.wasabisys.com
type: string
format: uri
s3ForcePathStyle:
default: false
description: Use path-style S3 URLs?
example: true
type: boolean
id:
readOnly: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- bucket
- prefix
- endpoint
- s3ForcePathStyle
- id
additionalProperties: false
- title: Cloudinary Backup
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- CLOUDINARY_BACKUP
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
type: string
description: Path prefix inside the bucket.
example: raw-assets
id:
readOnly: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- bucket
- prefix
- id
additionalProperties: false
- title: Web Folder
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- WEB_FOLDER
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
baseUrl:
type: string
format: uri
description: Root URL for the web folder origin.
example: https://images.example.com/assets
forwardHostHeaderToOrigin:
description: Forward the Host header to origin?
example: false
default: false
type: boolean
id:
readOnly: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- baseUrl
- forwardHostHeaderToOrigin
- id
additionalProperties: false
- title: Web Proxy
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- WEB_PROXY
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
id:
readOnly: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- id
additionalProperties: false
- title: Google Cloud Storage (GCS)
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- GCS
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
example: gcs-media
type: string
minLength: 1
maxLength: 100
prefix:
type: string
example: products
clientEmail:
example: service-account@project.iam.gserviceaccount.com
type: string
format: email
pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
id:
readOnly: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- bucket
- prefix
- clientEmail
- id
additionalProperties: false
- title: Azure Blob Storage
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- AZURE_BLOB
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
container:
example: images
type: string
minLength: 1
maxLength: 100
prefix:
type: string
example: uploads
accountName:
example: account123
type: string
minLength: 1
maxLength: 100
id:
readOnly: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- container
- prefix
- accountName
- id
additionalProperties: false
- title: Akeneo PIM
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
enum:
- AKENEO_PIM
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
baseUrl:
type: string
format: uri
description: Akeneo instance base URL.
example: https://akeneo.company.com
id:
readOnly: true
description: Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- baseUrl
- id
additionalProperties: false
type: object
responses:
Forbidden:
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Your account cannot be authenticated.
- Your request contains expired private API key.
- Your account is disabled.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
Unauthorized:
description: Unauthorized request.
content:
application/json:
schema:
type: object
properties:
message:
type:
# --- truncated at 32 KB (33 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/apis-json-v1-9-imagekit/refs/heads/main/openapi/imagekit-origins-api-openapi.yml