API Documentation
Integrate ShotMatch color grading into your applications.
Base URL: https://shotmatch.io/api/v1
Authentication
All authenticated endpoints require an API key passed via the X-API-Key header.
Create API keys from your Account.
Rate limit: 60 requests/minute per API key.
Sandbox Mode
Optionally add the X-Sandbox: true header to any request to enable sandbox mode. The header is entirely optional — omit it for normal operation. Use your regular API key — there are no separate test or live keys.
What changes in sandbox mode:
- No credits deducted — usage is logged but credits are not consumed
- No GPU/AI processing — Modal, R2, and OpenAI calls are skipped entirely
- Static demo results — responses contain demo images/videos instead of real output
- Instant responses — all endpoints return in <50ms
- All responses include
"sandbox": true
X-Sandbox header controls the behavior. Validation, authentication, and plan checks still run normally so you can verify your integration end-to-end.
Credits
Each API call may consume credits. Remaining credits are returned in the response.
Error Responses
All errors follow a consistent format:
| Status | Description |
|---|---|
| 400 | Validation error (check details) |
| 401 | Missing or invalid API key |
| 402 | Insufficient credits |
| 403 | Plan upgrade required |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
Color Matching
Single image color matching
Request Body
reference
string
Base64 or URL of reference image (deprecated — prefer reference_key)
reference_key
string
R2 key from /storage/presign
target
string
Base64 or URL of target image (deprecated — prefer target_key)
target_key
string
R2 key from /storage/presign
method
"natural" | "direct" | "smooth" | "balanced"
Default: natural
params
MatchParams
Example Request
Example Response
Batch image color matching
Request Body
reference
string
Base64 or URL of reference image (deprecated — prefer reference_key)
reference_key
string
R2 key from /storage/presign
targets
array
Base64 target images (deprecated — prefer target_keys)
target_keys
array
R2 keys from /storage/presign
method
"natural" | "direct" | "smooth" | "balanced"
Default: natural
params
MatchParams
Example Request
Example Response
Multi-reference color matching
Request Body
references
array
2-4 base64 or URL reference images (deprecated — prefer reference_keys)
reference_keys
array
2-4 R2 keys from /storage/presign
target
string
Base64 or URL of target image (deprecated — prefer target_key)
target_key
string
R2 key from /storage/presign
weights
array
Per-reference weights (must match references length)
method
"natural" | "direct" | "smooth" | "balanced"
Default: natural
blend_mode
"uniform" | "weighted" | "gradient"
Default: uniform
transition_width
number
Default: 0.2
intensity
number
Default: 0.5
params
MatchParams
Example Request
Example Response
List multi-reference blend modes
Example Response
Analysis
Analyze image color statistics
Request Body
image
string
Base64 or URL of image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
Example Request
Example Response
Presets
List all presets and film effects
Example Response
List available color grading presets
Example Response
Apply a color grading preset to an image
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
intensity
number
Default: 1.0
Example Request
Example Response
List custom presets
Example Response
Create a custom preset
Request Body
name
string
required
description
string
params
PresetParams
required
source_type
"scratch" | "fork" | "reference" | "history"
Default: scratch
base_preset
string
Example Request
Example Response
Delete a custom preset
Example Response
Get a custom preset
Example Response
Update a custom preset
Request Body
name
string
description
string
params
PresetParams
Example Request
Example Response
Extract preset params from an image
Request Body
image
string
Base64 image data (provide image or image_key, not both)
image_key
string
R2 key from /storage/presign
Example Request
Example Response
Preview custom LAB params on an image (stateless)
POST /presets/custom and optionally export a .cube LUT via POST /lut/export/preset/<name>.
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
params
PresetParams
required
intensity
number
Default: 1.0
Example Request
Example Response
Film Effects
Apply film effects to an image
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
preset
string
Effect preset name
effects
object
Granular effect config
intensity
number
Default: 1.0
Example Request
Example Response
List film effects presets
Example Response
Looks
List available looks
Example Response
Apply a look to an image
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
intensity
number
Default: 1.0
color_intensity
number
Default: 1.0
effects_intensity
number
Default: 1.0
effects_overrides
object
Per-effect override params
Example Request
Example Response
LUT Export
Apply a LUT extracted from before/after images
Example Request
Example Response
Export LUT from before/after images as .cube file
Example Request
Export color match as LUT file
Example Request
Export a preset as LUT file
Example Request
List available LUT sizes
Example Response
AI Color Grading
Refine AI color grading with follow-up
Request Body
prompt
string
required
Follow-up prompt
original_image
string
Original base64 image (deprecated — prefer original_image_key)
original_image_key
string
R2 key of original image from /storage/presign
last_result_image
string
Last result base64 image (deprecated — prefer last_result_image_key)
last_result_image_key
string
R2 key of last result image
current_values
object
required
Current ColorGradeValues dict from previous response
messages
object[]
required
Conversation history (list of {role, content} dicts)
Example Request
Example Response
AI color grading suggestion
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
prompt
string
required
Color grading prompt
Example Request
Example Response
Prompt-to-look — natural-language color grading powered by the ShotMatch catalog
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
prompt
string
required
Natural-language grade description
include_lut
boolean
Return a .cube LUT URL alongside the preview Default: True
lut_size
string
LUT resolution: small (17³), medium (33³), large (65³) Default: medium
intensity
number
Dose of the grade (0=original, 1=full effect, default 1.0) Default: 1.0
Example Request
Example Response
White Balance
Apply white balance correction
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
method
"auto" | "gray_world" | "white_patch" | "neutral_point"
Default: auto
intensity
number
Correction intensity (0=none, 1=full) Default: 1.0
neutral_x
number
Normalized X coordinate of neutral point (0.0=left, 1.0=right)
neutral_y
number
Normalized Y coordinate of neutral point (0.0=top, 1.0=bottom)
Example Request
Example Response
Style Transfer
Apply neural style transfer to an image
Request Body
content
string
Base64-encoded content image (deprecated — prefer content_key)
content_key
string
R2 key from /storage/presign
style
string
Base64-encoded style image (deprecated — prefer style_key)
style_key
string
R2 key from /storage/presign
seed
integer
Random seed for reproducibility Default: 42
Example Request
Example Response
Video Grading
Submit video color grading task (reference or preset)
Request Body
video_key
string
required
S3 key of uploaded video
reference
string
Base64 reference image (deprecated — prefer reference_key)
reference_key
string
R2 key of reference image from /storage/presign
preset
string
Preset name (e.g. cinematic_warm)
preset_intensity
number
Default: 1.0
method
"natural" | "direct" | "smooth" | "balanced"
Default: natural
quality
"perfect" | "pro" | "test" | "prores"
Default: pro
duration
number
required
Client-reported video duration for upfront credit calc
params
MatchParams
webhook_url
string
URL to POST result when processing completes
Example Request
Example Response
Test color grade on first video frame
Request Body
video_key
string
required
S3 key of uploaded video
reference
string
Base64 reference image (deprecated — prefer reference_key)
reference_key
string
R2 key of reference image from /storage/presign
preset
string
Preset name
preset_intensity
number
Default: 1.0
method
"natural" | "direct" | "smooth" | "balanced"
Default: natural
params
MatchParams
look_name
string
Cinematic look name (e.g. blade_runner)
look_intensity
number
Default: 1.0
look_color_intensity
number
Default: 1.0
look_effects_intensity
number
Default: 1.0
look_effects_overrides
object
Per-effect override params
multi_references
array
Base64 reference images (deprecated — prefer multi_reference_keys)
multi_reference_keys
array
R2 keys of reference images from /storage/presign
multi_blend_mode
"uniform" | "weighted" | "gradient"
Default: uniform
multi_method
"natural" | "direct" | "smooth" | "balanced"
Default: natural
multi_transition_width
number
Default: 0.2
multi_intensity
number
Default: 0.75
Example Request
Example Response
References
List saved reference images
Example Response
Upload a new reference image
Request Body
name
string
required
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
category_id
string
Category UUID
Example Request
Example Response
Delete a reference image
Example Response
Update a reference image
Request Body
name
string
category_id
string
position
integer
Example Request
Example Response
Get reference image as presigned URL
Example Response
Delete multiple reference images at once
Request Body
ids
string[]
required
Reference UUIDs to delete
Example Request
Example Response
List reference categories
Example Response
Create a reference category
Request Body
name
string
required
Example Request
Example Response
Delete a reference category
Example Response
Update a reference category
Request Body
name
string
position
integer
Example Request
Example Response
Reorder reference categories
Request Body
items
ReorderItem[]
required
Example Request
Example Response
Save a video clip to reference library
Example Request
Example Response
Save an extracted frame to reference library
Example Request
Example Response
Reorder reference images
Request Body
items
ReorderItem[]
required
Example Request
Example Response
History
List history entries
Example Response
Delete a history entry
Example Response
Get history image as presigned URL
Example Response
Download LUT from video history entry
Get presigned URL for graded video
Example Response
Delete multiple history entries at once
Request Body
ids
string[]
required
Reference UUIDs to delete
Example Request
Example Response
Get recent history filmstrip
Example Response
Preferences
Get user preferences
Example Response
Update user preferences
Request Body
auto_apply_on_drag
boolean
theme
string
Example Request
Example Response
Storage
Delete a file from storage
Example Response
Get presigned upload URL for direct upload
Request Body
filename
string
Default: image.jpg
content_type
string
Default: image/jpeg
folder
string
Default: images
Example Request
Example Response
Upload a file via base64 JSON
Request Body
data
string
Base64-encoded file data (deprecated — prefer /storage/presign)
data_key
string
R2 key from /storage/presign (no-op — file already uploaded)
folder
string
Default: images
Example Request
Example Response
Upload a video file via base64 or presign workflow
Example Request
Example Response
Refresh presigned URL for existing file
Request Body
key
string
required
S3 object key
expires_in
integer
Expiry in seconds Default: 604800
Example Request
Example Response
Tasks & Queue
Account
Get account information
Example Response
Get API usage history
Example Response
Other
Health check endpoint
Example Response
Bg Remove
Remove image background (GPU)
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign
Example Request
Example Response
Plugin
List recent plugin devices for the user
Revoke all plugin sessions for a single device
Server-generated preset LUT (entitled users only)
Plugin preset catalog (entitlement-gated)
Exchange API key for a 24h plugin session token
Example Response
Plugin version manifest (auto-update check)
Example Response
Identify the caller + return entitlement
Example Response
Stacks
List processing stacks
Example Response
Create a processing stack
Request Body
name
string
required
description
string
steps
ActionStep[]
required
Example Request
Example Response
Delete a processing stack
Example Response
Get a processing stack
Example Response
Update a processing stack
Request Body
name
string
description
string
steps
array
Example Request
Example Response
Apply a processing stack to an image
Request Body
image
string
Base64 image data (provide image or image_key, not both)
image_key
string
R2 key from /storage/presign
stack_id
string
ID of a saved stack (provide stack_id or steps, not both)
steps
array
Inline steps array (alternative to stack_id)
Example Request
Example Response
Apply a processing stack to a full video
Request Body
video_key
string
required
R2 key from /storage/presign
stack_id
string
ID of a saved stack
steps
array
Inline steps array (alternative to stack_id)
duration
number
required
Video duration in seconds (for credit estimation)
quality
"perfect" | "pro" | "test"
Processing quality preset Default: pro
webhook_url
string
Optional webhook for completion notification
Example Request
Example Response
Test a processing stack on the first frame of a video
Request Body
video_key
string
required
R2 key from /storage/presign
stack_id
string
ID of a saved stack
steps
array
Inline steps array (alternative to stack_id)