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 Dashboard.
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.
| Endpoint | Cost | Plan |
|---|---|---|
| POST /api/v1/match | 1 credit | All |
| POST /api/v1/match/batch | 1 credit | All |
| POST /api/v1/match/multi | 1 credit | All |
| GET /api/v1/match/multi/modes | Free | All |
| POST /api/v1/analyze | 1 credit | All |
| GET /api/v1/options | Free | All |
| GET /api/v1/presets | Free | All |
| POST /api/v1/presets/<preset_name>/apply | 1 credit | All |
| GET /api/v1/presets/custom | Free | All |
| POST /api/v1/presets/custom | Free | pro+ |
| DELETE /api/v1/presets/custom/<preset_id> | Free | pro+ |
| GET /api/v1/presets/custom/<preset_id> | Free | All |
| PUT /api/v1/presets/custom/<preset_id> | Free | pro+ |
| POST /api/v1/presets/custom/from-image | Free | pro+ |
| POST /api/v1/film-effects/apply | 1 credit | All |
| GET /api/v1/film-effects/presets | Free | All |
| GET /api/v1/looks | Free | All |
| POST /api/v1/looks/<look_name>/apply | 1 credit | All |
| POST /api/v1/lut/apply | 1 credit | All |
| POST /api/v1/lut/export/before-after | 2 credits | pro+ |
| POST /api/v1/lut/export/match | 2 credits | pro+ |
| POST /api/v1/lut/export/preset/<preset_name> | 2 credits | pro+ |
| GET /api/v1/lut/sizes | Free | All |
| POST /api/v1/ai/refine | 2 credits | All |
| POST /api/v1/ai/suggest | 2 credits | All |
| POST /api/v1/white-balance/apply | 1 credit | All |
| POST /api/v1/style-transfer/apply | 5 credits | All |
| POST /api/v1/video/grade | Free | pro+ |
| POST /api/v1/video/test | 1 credit | pro+ |
| GET /api/v1/actions | Free | All |
| POST /api/v1/actions | Free | All |
| DELETE /api/v1/actions/<action_id> | Free | All |
| GET /api/v1/actions/<action_id> | Free | All |
| PUT /api/v1/actions/<action_id> | Free | All |
| POST /api/v1/actions/apply | 2 credits | All |
| GET /api/v1/references | Free | All |
| POST /api/v1/references | Free | All |
| DELETE /api/v1/references/<ref_id> | Free | All |
| PATCH /api/v1/references/<ref_id> | Free | All |
| GET /api/v1/references/<ref_id>/image | Free | All |
| POST /api/v1/references/batch-delete | Free | All |
| GET /api/v1/references/categories | Free | All |
| POST /api/v1/references/categories | Free | All |
| DELETE /api/v1/references/categories/<cat_id> | Free | All |
| PATCH /api/v1/references/categories/<cat_id> | Free | All |
| POST /api/v1/references/categories/reorder | Free | All |
| POST /api/v1/references/clip | Free | All |
| POST /api/v1/references/frame | Free | All |
| POST /api/v1/references/reorder | Free | All |
| DELETE /api/v1/history | Free | All |
| GET /api/v1/history | Free | All |
| DELETE /api/v1/history/<entry_id> | Free | All |
| GET /api/v1/history/<entry_id>/image | Free | All |
| GET /api/v1/history/<entry_id>/lut | Free | All |
| GET /api/v1/history/<entry_id>/video | Free | All |
| POST /api/v1/history/batch-delete | Free | All |
| GET /api/v1/history/filmstrip | Free | All |
| GET /api/v1/preferences | Free | All |
| PATCH /api/v1/preferences | Free | All |
| DELETE /api/v1/storage/<path:key> | Free | All |
| POST /api/v1/storage/presign | Free | All |
| POST /api/v1/storage/upload | Free | All |
| POST /api/v1/storage/upload/video | Free | All |
| POST /api/v1/storage/url | Free | All |
| GET /api/v1/queue/stats | Free | All |
| GET /api/v1/tasks/<task_id> | Free | All |
| GET /api/v1/account | Free | All |
| GET /api/v1/account/usage | Free | All |
| POST /api/v1/bg-remove/apply | 2 credits | All |
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
/api/v1/match
1 credit
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
/api/v1/match/batch
1 credit
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
/api/v1/match/multi
1 credit
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
/api/v1/match/multi/modes
Free
No auth
List multi-reference blend modes
Example Response
Analysis
/api/v1/analyze
1 credit
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
/api/v1/options
Free
No auth
List all presets and film effects
Example Response
/api/v1/presets
Free
No auth
List available color grading presets
Example Response
/api/v1/presets/<preset_name>/apply
1 credit
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
/api/v1/presets/custom
Free
List custom presets
Example Response
/api/v1/presets/custom
Free
pro+
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
/api/v1/presets/custom/<preset_id>
Free
pro+
Delete a custom preset
Example Response
/api/v1/presets/custom/<preset_id>
Free
Get a custom preset
Example Response
/api/v1/presets/custom/<preset_id>
Free
pro+
Update a custom preset
Request Body
name
string
description
string
params
PresetParams
Example Request
Example Response
/api/v1/presets/custom/from-image
Free
pro+
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
Film Effects
/api/v1/film-effects/apply
1 credit
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
/api/v1/film-effects/presets
Free
No auth
List film effects presets
Example Response
Looks
/api/v1/looks
Free
No auth
List available looks
Example Response
/api/v1/looks/<look_name>/apply
1 credit
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
/api/v1/lut/apply
1 credit
Apply a LUT extracted from before/after images
Example Request
Example Response
/api/v1/lut/export/before-after
2 credits
pro+
Export LUT from before/after images as .cube file
Example Request
/api/v1/lut/export/match
2 credits
pro+
Export color match as LUT file
Example Request
/api/v1/lut/export/preset/<preset_name>
2 credits
pro+
Export a preset as LUT file
Example Request
/api/v1/lut/sizes
Free
No auth
List available LUT sizes
Example Response
AI Color Grading
/api/v1/ai/refine
2 credits
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
/api/v1/ai/suggest
2 credits
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
White Balance
/api/v1/white-balance/apply
1 credit
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
/api/v1/style-transfer/apply
5 credits
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
/api/v1/video/grade
Free
pro+
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"
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
/api/v1/video/test
1 credit
pro+
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
Actions
/api/v1/actions
Free
List processing actions
Example Response
/api/v1/actions
Free
Create a processing action
Request Body
name
string
required
description
string
steps
ActionStep[]
required
Example Request
Example Response
/api/v1/actions/<action_id>
Free
Delete a processing action
Example Response
/api/v1/actions/<action_id>
Free
Get a processing action
Example Response
/api/v1/actions/<action_id>
Free
Update a processing action
Request Body
name
string
description
string
steps
array
Example Request
Example Response
/api/v1/actions/apply
2 credits
Apply a processing action 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
action_id
string
ID of a saved action (provide action_id or steps, not both)
steps
array
Inline steps array (alternative to action_id)
Example Request
Example Response
References
/api/v1/references
Free
List saved reference images
Example Response
/api/v1/references
Free
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
/api/v1/references/<ref_id>
Free
Delete a reference image
Example Response
/api/v1/references/<ref_id>
Free
Update a reference image
Request Body
name
string
category_id
string
position
integer
Example Request
Example Response
/api/v1/references/<ref_id>/image
Free
Get reference image as presigned URL
Example Response
/api/v1/references/batch-delete
Free
Delete multiple reference images at once
Request Body
ids
string[]
required
Reference UUIDs to delete
Example Request
Example Response
/api/v1/references/categories
Free
List reference categories
Example Response
/api/v1/references/categories
Free
Create a reference category
Request Body
name
string
required
Example Request
Example Response
/api/v1/references/categories/<cat_id>
Free
Delete a reference category
Example Response
/api/v1/references/categories/<cat_id>
Free
Update a reference category
Request Body
name
string
position
integer
Example Request
Example Response
/api/v1/references/categories/reorder
Free
Reorder reference categories
Request Body
items
ReorderItem[]
required
Example Request
Example Response
/api/v1/references/clip
Free
Save a video clip to reference library
Example Request
Example Response
/api/v1/references/frame
Free
Save an extracted frame to reference library
Example Request
Example Response
/api/v1/references/reorder
Free
Reorder reference images
Request Body
items
ReorderItem[]
required
Example Request
Example Response
History
/api/v1/history
Free
Clear all history
Example Response
/api/v1/history
Free
List history entries
Example Response
/api/v1/history/<entry_id>
Free
Delete a history entry
Example Response
/api/v1/history/<entry_id>/image
Free
Get history image as presigned URL
Example Response
/api/v1/history/<entry_id>/lut
Free
Download LUT from video history entry
/api/v1/history/<entry_id>/video
Free
Get presigned URL for graded video
Example Response
/api/v1/history/batch-delete
Free
Delete multiple history entries at once
Request Body
ids
string[]
required
Reference UUIDs to delete
Example Request
Example Response
/api/v1/history/filmstrip
Free
Get recent history filmstrip
Example Response
Preferences
/api/v1/preferences
Free
Get user preferences
Example Response
/api/v1/preferences
Free
Update user preferences
Request Body
auto_apply_on_drag
boolean
theme
string
Example Request
Example Response
Storage
/api/v1/storage/<path:key>
Free
Delete a file from storage
Example Response
/api/v1/storage/presign
Free
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
/api/v1/storage/upload
Free
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
/api/v1/storage/upload/video
Free
Upload a video file via base64 or presign workflow
Example Request
Example Response
/api/v1/storage/url
Free
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
/api/v1/queue/stats
Free
Get queue statistics
Example Response
/api/v1/tasks/<task_id>
Free
Get async task status and result
Example Response
Account
/api/v1/account
Free
Get account information
Example Response
/api/v1/account/usage
Free
Get API usage history
Example Response
Bg Remove
/api/v1/bg-remove/apply
2 credits
Remove image background (GPU)
Request Body
image
string
Base64-encoded image (deprecated — prefer image_key)
image_key
string
R2 key from /storage/presign