Official HTTP API for file management and link lifecycle operations.
#API Base URL
https://wisylink.com/api
#Authentication
| Header | Required | Format | Notes |
|---|---|---|---|
x-api-key | Yes (or use Authorization) | <api_key> | Preferred header for server-to-server requests. |
Authorization | Yes (or use x-api-key) | Bearer <api_key> | Same authorization behavior. |
#Request/Response Basics
| Rule | Value |
|---|---|
| JSON endpoints | Content-Type: application/json |
| Chunk upload body | Content-Type: application/octet-stream |
| Timestamp format | Epoch milliseconds (number) |
| File id format | 24-character hex string |
| Link id format | 24-character hex string |
| Shared link path format | https://wisylink.com/<id> |
#File Constraints
| Rule | Value |
|---|---|
| Max upload size | 25 MB (26214400 bytes) |
| Max chunk size | 4 MB (4194304 bytes) |
| Allowed extensions | jpeg/jpg, png, mp3, mp4, pdf, xlsx, docx, csv, txt, json, html |
| Empty uploads | Rejected |
#Endpoints
#Files
#Create File
/filesStarts a new file upload session and returns the file id to use in chunk uploads.
Request:
| Field | Where | Type | Required | Rules |
|---|---|---|---|---|
name | JSON body | string | No | Original file name hint. Extension is replaced with detected real extension before persistence. |
Request example:
curl -X POST "https://wisylink.com/api/files" \
-H "x-api-key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "my-original-video.mov"
}'Response (201):
| Field | Type | Description |
|---|---|---|
id | string | File identifier (24-char hex). |
created_at | number | Epoch milliseconds. |
{
"id": "67e6f6e6c5a91e4d2d9b0a11",
"created_at": 1762432496000
}#Upload File
/files/chunksUploads raw file chunks to an existing file id. Each request accepts at most 4 MB.
Request:
| Field | Where | Type | Required | Rules |
|---|---|---|---|---|
id | Query | string | Yes | File id from Create File. |
last | Query | boolean | No | Defaults to false. Set true for the final chunk. |
| (body) | Raw body | binary | Yes | application/octet-stream, max 4194304 bytes. |
Request example:
curl -X POST "https://wisylink.com/api/files/chunks?id=<file_id>&last=true" \
-H "x-api-key: <api_key>" \
-H "Content-Type: application/octet-stream" \
--data-binary "@./chunk-last.bin"Response (200):
| Field | Type | Description |
|---|---|---|
id | string | File identifier. |
ok | boolean | true when chunk write is accepted. |
{
"id": "67e6f6e6c5a91e4d2d9b0a11",
"ok": true
}Notes:
- Upload sessions expire automatically if not completed within
15minutes. - The final chunk must be sent with
last=true; that call finalizes and processes the file.
#Get File
/files/:idReturns metadata for a single uploaded file by id.
Request:
| Field | Where | Type | Required | Rules |
|---|---|---|---|---|
id | Path | string | Yes | Must be a valid id (24-char hex). |
Request example:
curl "https://wisylink.com/api/files/67e6f6e6c5a91e4d2d9b0a11" \
-H "x-api-key: <api_key>"Response (200):
| Field | Type | Description |
|---|---|---|
id | string | File identifier (24-char hex). |
content_type | string | MIME content type. |
name | string | Persisted display file name (original base name + detected extension). |
size | number | Byte size. |
created_at | number | Epoch milliseconds. |
updated_at | number | Epoch milliseconds. |
{
"id": "67e6f6e6c5a91e4d2d9b0a11",
"content_type": "video/mp4",
"name": "my-original-video.mp4",
"size": 128934,
"created_at": 1762432496000,
"updated_at": 1762432496000
}#Delete File
/files/:idPermanently removes a single uploaded file and its stored object. References to this file id in any link file_ids are removed automatically.
Request:
| Field | Where | Type | Required | Rules |
|---|---|---|---|---|
id | Path | string | Yes | Must be a valid id (24-char hex). |
Request example:
curl -X DELETE "https://wisylink.com/api/files/67e6f6e6c5a91e4d2d9b0a11" \
-H "x-api-key: <api_key>"Response (200):
{ "ok": true }#Links
#Create Link
/linksCreates a single link with generation input and optional attached files.
Request:
| Field | Where | Type | Required | Rules |
|---|---|---|---|---|
type | JSON body | string | Yes | Allowed: image, audio, video, pdf, page. |
prompt | JSON body | string | Yes | Min 1, max 1000 characters. |
hosted | JSON body | boolean | No | Defaults to false when omitted. |
private | JSON body | boolean | No | Defaults to false when omitted. |
file_ids[] | JSON body | string[] | No | Max 10, each item must be 24-char hex, deduplicated, and owned by same API key owner. |
Notes:
file_idsreferences uploaded files. Use Create File and Upload File first, then pass the returned file id values (idfield).private: trueadds stricter crawler-discovery blocking intent for the link surface.shared_urlis generated from the apex domain + link id (extensionless path).- New links are created with
status: pendinginternally.
Request example:
curl -X POST "https://wisylink.com/api/links" \
-H "x-api-key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"type": "video",
"prompt": "Create a short product trailer with energetic pacing.",
"hosted": true,
"file_ids": ["67e6f6e6c5a91e4d2d9b0a11", "67e6f6e6c5a91e4d2d9b0a22"]
}'Response (201):
| Field | Type | Description |
|---|---|---|
id | string | Link identifier. |
shared_url | string | Public shared URL derived from extensionless link id path. |
status | string | pending, generating, completed. |
created_at | number | Epoch milliseconds. |
updated_at | number | Epoch milliseconds. |
{
"id": "67e6f6e6c5a91e4d2d9b0a77",
"shared_url": "https://wisylink.com/67e6f6e6c5a91e4d2d9b0a77",
"status": "pending",
"created_at": 1762432496000,
"updated_at": 1762432496000
}#Get Link
/links/:idReturns a single link by id with current status and shared URL.
Request:
| Field | Where | Type | Required | Rules |
|---|---|---|---|---|
id | Path | string | Yes | Link id (24-char hex). |
Notes:
metais present in the response only whenstatusiscompleted.meta.duration(seconds) is included only whentypeisaudioorvideo.
Request example:
curl "https://wisylink.com/api/links/67e6f6e6c5a91e4d2d9b0a77" \
-H "x-api-key: <api_key>"Response (200):
| Field | Type | Description |
|---|---|---|
id | string | Link identifier. |
type | string | Link type. |
prompt | string | Prompt payload. |
hosted | boolean | Hosted state. |
private | boolean | Private crawler-discovery block flag. |
status | string | pending, generating, completed. |
meta | object | title, description, cover, duration. |
outputs | string[] | Generated output paths/URLs. |
file_ids | string[] | Attached file ids. |
created_at | number | Epoch milliseconds. |
updated_at | number | Epoch milliseconds. |
shared_url | string | Public shared URL. |
{
"id": "67e6f6e6c5a91e4d2d9b0a77",
"type": "video",
"prompt": "Create a short product trailer with energetic pacing.",
"hosted": true,
"status": "completed",
"meta": {
"title": "Product Trailer — Energetic Pacing",
"description": "A punchy 10-second trailer showcasing the product with energetic cuts and momentum.",
"cover": "cover.jpg",
"duration": 10
},
"outputs": ["output-1.mp4"],
"file_ids": ["67e6f6e6c5a91e4d2d9b0a11"],
"created_at": 1762432496000,
"updated_at": 1762432596000,
"shared_url": "https://wisylink.com/67e6f6e6c5a91e4d2d9b0a77"
}#Update Link
/links/:idUpdates a single existing link by id using mutable fields (prompt, hosted, private, file_ids).
Request:
| Field | Where | Type | Required | Rules |
|---|---|---|---|---|
id | Path | string | Yes | Link id (24-char hex). |
prompt | JSON body | string | No | Min 1, max 1000. |
hosted | JSON body | boolean | No | Hosted flag. |
private | JSON body | boolean | No | Private crawler-discovery block flag. |
file_ids[] | JSON body | string[] | No | Same file id constraints as create. |
Rules:
- At least one updatable field must be present in request body.
- If
file_idsis provided, it fully replaces the existing attachment list. - To keep older file ids, include them again in the same update request.
- File ids removed from the list are deleted with their related asset records.
- If
promptchanges, regeneration is auto-queued and update credit is consumed. Changes tofile_ids,hosted, orprivatealone do not trigger regeneration. - Hosted links cost 1 credit/day; hosted + private links cost 2 credits/day.
Request example:
curl -X PATCH "https://wisylink.com/api/links/67e6f6e6c5a91e4d2d9b0a77" \
-H "x-api-key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Create a 20-second trailer, emphasize motion graphics.",
"file_ids": ["67e6f6e6c5a91e4d2d9b0a22"],
"hosted": true
}'Response (200):
Same fields as Get Link response.
{
"id": "67e6f6e6c5a91e4d2d9b0a77",
"type": "video",
"prompt": "Create a 20-second trailer, emphasize motion graphics.",
"hosted": true,
"status": "pending",
"outputs": ["output-1.mp4"],
"file_ids": ["67e6f6e6c5a91e4d2d9b0a22"],
"created_at": 1762432496000,
"updated_at": 1762432696000,
"shared_url": "https://wisylink.com/67e6f6e6c5a91e4d2d9b0a77"
}#Delete Link
/links/:idPermanently removes a single link by id. Files listed in the link file_ids are deleted together (file record + stored object).
Request:
| Field | Where | Type | Required | Rules |
|---|---|---|---|---|
id | Path | string | Yes | Link id (24-char hex). |
Request example:
curl -X DELETE "https://wisylink.com/api/links/67e6f6e6c5a91e4d2d9b0a77" \
-H "x-api-key: <api_key>"Response (200):
{ "ok": true }#Errors
#Unauthorized
unauthorizedReturned when API key is missing or invalid.
{
"error": "unauthorized",
"message": "Missing or invalid API key. Provide `x-api-key` or `Authorization: Bearer <key>`."
}#Credit Limit Exceeded
credit_limit_exceededReturned when API key usage exceeds credit limit for the active period.
{
"error": "credit_limit_exceeded",
"message": "API key credit limit is exceeded for the current period.",
"limit": 100,
"used": 100,
"remaining": 0,
"period": "day",
"resets_at": 1762473600000
}#Bad Request
bad_requestReturned for invalid request shape, invalid types, invalid formats, or missing required values.
#Not Found
not_foundReturned when target file or link does not exist for the authenticated owner.