https://api.jsoncut.com
Every request requires an API key in the x-api-key header:
curl -H "x-api-key: jc_live_your_api_key_here" https://api.jsoncut.com/api/v1/files- Keys are prefixed with
jc_live_ - Obtain keys from the dashboard at app.jsoncut.com
- Two permission levels: Read-Only (view/download) and Full Access (all operations)
- Missing/invalid key returns
401, insufficient permissions returns403
Upload source files or use public URLs directly in your config.
curl -X POST https://api.jsoncut.com/api/v1/files/upload \
-H "x-api-key: jc_live_..." \
-F "file=@image.jpg" \
-F "category=image"Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
file |
file | Yes | The file to upload (max 100MB) |
category |
string | Yes | image, video, audio, or font |
ttlHours |
number | No | Time-to-live in hours (default: 1, max: 48) |
Supported file types:
| Category | Extensions |
|---|---|
| Image | .png, .jpg, .jpeg, .gif, .webp |
| Video | .mp4, .webm, .mov |
| Audio | .mp3, .wav, .m4a, .aac |
| Font | .ttf, .otf, .woff, .woff2 |
Response:
{
"success": true,
"data": {
"id": "file-id-here",
"storageUrl": "/image/2024-01-15/user123/image.jpg",
"category": "image",
"originalName": "image.jpg",
"size": 245000,
"mimeType": "image/jpeg"
}
}Use the storageUrl value as the path in your job config.
curl -X POST https://api.jsoncut.com/api/v1/jobs \
-H "x-api-key: jc_live_..." \
-H "Content-Type: application/json" \
-d '{
"type": "image",
"config": {
"width": 800,
"height": 600,
"layers": [
{ "type": "rectangle", "width": 800, "height": 600, "fill": "#3b82f6" },
{ "type": "text", "text": "Hello World", "fontSize": 48, "color": "#ffffff", "position": "center" }
]
}
}'Request body:
| Field | Type | Required | Description |
|---|---|---|---|
type |
string | Yes | "image" or "video" |
config |
object | Yes | The generation configuration (see image/video docs) |
Response:
{
"success": true,
"data": {
"id": "job-id-here",
"type": "image",
"status": "PENDING",
"createdAt": "2024-01-15T12:00:00Z"
}
}curl https://api.jsoncut.com/api/v1/jobs/{jobId} \
-H "x-api-key: jc_live_..."Job statuses:
| Status | Description |
|---|---|
PENDING |
Job is queued |
PROCESSING |
Job is being processed |
COMPLETED |
Job finished — download the result |
FAILED |
Job failed — check error field |
Completed response includes:
{
"success": true,
"data": {
"id": "job-id-here",
"status": "COMPLETED",
"outputFileId": "output-file-id",
"inputFileIds": ["input-file-id-1"]
}
}curl https://api.jsoncut.com/api/v1/files/{outputFileId}/download \
-H "x-api-key: jc_live_..." \
-o result.pngThere are two ways to reference files in your job config:
Use the storageUrl from the upload response:
{ "path": "/image/2024-01-15/user123/photo.jpg" }Use any publicly accessible URL with a file extension:
{ "path": "https://images.unsplash.com/photo-123456.jpg" }Public URLs are automatically downloaded and validated. URLs must end with a recognized file extension (.jpg, .png, .mp4, etc.).
Always validate your config first to catch errors without consuming tokens:
curl -X POST https://api.jsoncut.com/api/v1/jobs/validate \
-H "x-api-key: jc_live_..." \
-H "Content-Type: application/json" \
-d '{
"type": "image",
"config": { ... }
}'Response (always HTTP 200):
{
"success": true,
"data": {
"isValid": true,
"errors": []
}
}Check isValid — if false, the errors array describes what's wrong.
Get the full JSON schema for validation or reference:
# Image schema
curl https://api.jsoncut.com/api/v1/schemas/image
# Video schema
curl https://api.jsoncut.com/api/v1/schemas/video
# List all schemas
curl https://api.jsoncut.com/api/v1/schemasGET /api/v1/files?page=1&limit=10GET /api/v1/files/{fileId}DELETE /api/v1/files/{fileId}GET /api/v1/jobs?page=1&limit=10&status=COMPLETEDDELETE /api/v1/jobs/{jobId}POST /api/v1/files/{fileId}/public-linkReturns a time-limited public URL that requires no authentication.
POST /api/v1/tools/video/duration
Content-Type: application/json
{ "path": "/video/user123/clip.mp4" }POST /api/v1/tools/audio/duration
Content-Type: application/json
{ "path": "/audio/user123/track.mp3" }POST /api/v1/tools/video/duration/bulk
POST /api/v1/tools/audio/duration/bulk
Content-Type: application/json
{ "paths": ["/video/user123/clip1.mp4", "/video/user123/clip2.mp4"] }POST /api/v1/files/validate/image # Validate image format
POST /api/v1/files/validate/video # Validate video format
POST /api/v1/files/validate/audio # Validate audio formatGET /api/v1/files/supported-types| Type | Limit | Window |
|---|---|---|
| API Requests | 1,000 | 15 minutes |
| File Uploads | 10 | 1 minute |
| Job Creation | 10 | 1 minute |
| Concurrent Jobs | 3 | — |
Rate limit headers are included in every response:
X-RateLimit-Limit— max requestsX-RateLimit-Remaining— remaining requestsX-RateLimit-Reset— reset timestamp
Exceeding limits returns HTTP 429.
| Operation | Cost |
|---|---|
| File upload | 1 token |
| Image job | 2 + (1 × number of layers) |
| Video job | 10 base + (5 × output MB), minimum 20 |
Tokens are only charged on successful completion — failed jobs don't consume tokens.
| Type | Typical Duration |
|---|---|
| Simple image (1-3 layers) | 2–10 seconds |
| Complex image (10+ layers) | 10–30 seconds |
| Short video (<30s) | 30–90 seconds |
| Longer video (1-5 min) | 2–5 minutes per output minute |
All error responses follow this format:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error description"
}
}| HTTP Status | Meaning |
|---|---|
400 |
Invalid request (bad config, missing fields) |
401 |
Invalid or missing API key |
403 |
Insufficient permissions (read-only key) |
404 |
Resource not found |
429 |
Rate limit exceeded |
500 |
Server error |