WisyLink API

Official API reference and integration conventions for WisyLink.

Sections

Official HTTP API for file management and link lifecycle operations.

#API Base URL

  • https://wisylink.com/api

#Authentication

HeaderRequiredFormatNotes
x-api-keyYes (or use Authorization)<api_key>Preferred header for server-to-server requests.
AuthorizationYes (or use x-api-key)Bearer <api_key>Same authorization behavior.

#Request/Response Basics

RuleValue
JSON endpointsContent-Type: application/json
Chunk upload bodyContent-Type: application/octet-stream
Timestamp formatEpoch milliseconds (number)
File id format24-character hex string
Link id format24-character hex string
Hosted link URL formathttps://<id>.wisylink.com

#Credits & Pricing

API requests draw from your account's prepaid credit balance, separate from any subscription. Each request is metered only for the work it does — the agent's reasoning tokens and the input tokens read from any reference files.

ResourceUnitPrice (USD)
Agent reasoningper 1K tokens$0.000010

Reference files add no upload fee; they are metered as the input tokens the agent reads, billed at the agent-reasoning rate.

#File Constraints

RuleValue
Max upload size25 MB (26214400 bytes)
Max chunk size4 MB (4194304 bytes)
Allowed extensionsjpeg/jpg, png, webp, gif, heic, svg, mp3, mp4, pdf, xlsx, docx, csv, txt, json, html
Empty uploadsRejected

#Endpoints

#Files

#Create File

POST/files

Starts a new file upload session and returns the file id to use in chunk uploads.

Request:

FieldWhereTypeRequiredRules
nameJSON bodystringNoOriginal file name hint. Extension is replaced with detected real extension before persistence.

Request example:

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"
  }'
bash

Response (201):

FieldTypeDescription
idstringFile identifier (24-char hex).
created_atnumberEpoch milliseconds.
Examplejson
{
  "id": "67e6f6e6c5a91e4d2d9b0a11",
  "created_at": 1762432496000
}

#Upload File

POST/files/chunks

Uploads raw file chunks to an existing file id. Each request accepts at most 4 MB.

Request:

FieldWhereTypeRequiredRules
idQuerystringYesFile id from Create File.
lastQuerybooleanNoDefaults to false. Set true for the final chunk.
(body)Raw bodybinaryYesapplication/octet-stream, max 4194304 bytes.

Request example:

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"
bash

Response (200):

FieldTypeDescription
idstringFile identifier.
okbooleantrue when chunk write is accepted.
Examplejson
{
  "id": "67e6f6e6c5a91e4d2d9b0a11",
  "ok": true
}

Notes:

  • Upload sessions expire automatically if not completed within 15 minutes.
  • The final chunk must be sent with last=true; that call finalizes and processes the file.

#Get File

GET/files/:id

Returns metadata for a single uploaded file by id.

Request:

FieldWhereTypeRequiredRules
idPathstringYesMust be a valid id (24-char hex).

Request example:

Request example
curl "https://wisylink.com/api/files/67e6f6e6c5a91e4d2d9b0a11" \
  -H "x-api-key: <api_key>"
bash

Response (200):

FieldTypeDescription
idstringFile identifier (24-char hex).
content_typestringMIME content type.
namestringPersisted display file name (original base name + detected extension).
sizenumberByte size.
created_atnumberEpoch milliseconds.
updated_atnumberEpoch milliseconds.
Examplejson
{
  "id": "67e6f6e6c5a91e4d2d9b0a11",
  "content_type": "video/mp4",
  "name": "my-original-video.mp4",
  "size": 128934,
  "created_at": 1762432496000,
  "updated_at": 1762432496000
}

#Delete File

DELETE/files/:id

Permanently removes a single uploaded file and its stored object. References to this file id in any link file_ids are removed automatically.

Request:

FieldWhereTypeRequiredRules
idPathstringYesMust be a valid id (24-char hex).

Request example:

Request example
curl -X DELETE "https://wisylink.com/api/files/67e6f6e6c5a91e4d2d9b0a11" \
  -H "x-api-key: <api_key>"
bash

Response (200):

Examplejson
{ "ok": true }
POST/chat

Creates a new link or continues an existing one. The Wisy agent reads the message, builds a hosted page, and reports back. Privacy and page meta are resolved by the agent — no explicit type or settings fields in the request.

Request:

FieldWhereTypeRequiredRules
idJSON bodystringNoExisting link id. Omit to create a new link; provide to continue an existing one.
messageJSON bodystringYesYour request — describe what to generate or change.
file_idsJSON bodystring[]NoMax 10, owned by the same API key owner.

Notes:

  • Omit id to start a fresh link; the build begins immediately and status is building until it settles.
  • Include id to continue generation on an existing link. The server tracks conversation history — send only the new message.
  • file_ids references uploaded files. Use Create File and Upload File first, then pass the returned id values.
  • url is the hosted page URL; it goes live once the build finishes (status becomes completed).

Request example:

Request example
# New link
curl -X POST "https://wisylink.com/api/chat" \
  -H "x-api-key: <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Create a short product trailer with energetic pacing.",
    "file_ids": ["abc123"]
  }'
bash

Response (201 for new link, 200 for continued link):

FieldTypeDescription
idstringLink identifier.
urlstringHosted page URL.
statusstringbuilding \
answerstringWisy's reply to the request.
created_atnumberEpoch milliseconds.
updated_atnumberEpoch milliseconds.
Examplejson
{
  "id": "abc123",
  "url": "https://abc123.wisylink.com",
  "status": "building",
  "answer": "On it — building your product trailer now.",
  "created_at": 1762432496000,
  "updated_at": 1762432496000
}
GET/links

Returns your links, newest first, with page-based pagination.

Request:

FieldWhereTypeRequiredRules
pageQuerynumberNo1-based page number. Defaults to 1.
limitQuerynumberNoItems per page, 1..100. Defaults to 20.

Request example:

Request example
curl "https://wisylink.com/api/links?page=1&limit=20" \
  -H "x-api-key: <api_key>"
bash

Response (200):

FieldTypeDescription
itemsobject[]Links for this page; each item has the same shape as Get Link.
pagenumberCurrent page.
limitnumberItems per page.
totalnumberTotal links across all pages.
total_pagesnumberTotal page count.
has_prevbooleanWhether a previous page exists.
has_nextbooleanWhether a next page exists.
Examplejson
{
  "items": [
    {
      "id": "abc123",
      "url": "https://abc123.wisylink.com",
      "status": "completed",
      "file_ids": ["67e6f6e6c5a91e4d2d9b0a11"],
      "created_at": 1762432496000,
      "updated_at": 1762432596000
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1,
  "total_pages": 1,
  "has_prev": false,
  "has_next": false
}
GET/links/:id

Returns a single link by id with its hosted-page URL and metadata.

Request:

FieldWhereTypeRequiredRules
idPathstringYesLink id.

Notes:

  • url is the hosted page URL.
  • file_ids lists the reference files attached to the link.

Request example:

Request example
curl "https://wisylink.com/api/links/abc123" \
  -H "x-api-key: <api_key>"
bash

Response (200):

FieldTypeDescription
idstringLink identifier.
urlstringHosted page URL.
statusstringbuilding \
file_idsstring[]Reference files attached to the link.
created_atnumberEpoch milliseconds.
updated_atnumberEpoch milliseconds.
Examplejson
{
  "id": "abc123",
  "url": "https://abc123.wisylink.com",
  "status": "completed",
  "file_ids": ["67e6f6e6c5a91e4d2d9b0a11"],
  "created_at": 1762432496000,
  "updated_at": 1762432596000
}
DELETE/links/:id

Permanently removes a single link by id. Files listed in the link file_ids are deleted together (file record + stored object).

Request:

FieldWhereTypeRequiredRules
idPathstringYesLink id.

Request example:

Request example
curl -X DELETE "https://wisylink.com/api/links/abc123" \
  -H "x-api-key: <api_key>"
bash

Response (200):

Examplejson
{ "ok": true }

#Errors

#Unauthorized

401unauthorized

Returned when API key is missing or invalid.

Examplejson
{
  "error": "unauthorized",
  "message": "Missing or invalid API key. Provide `x-api-key` or `Authorization: Bearer <key>`."
}

#Insufficient Credit

402insufficient_credit

Returned by POST /links when the account's API credit balance is empty and can't cover a new build.

Examplejson
{
  "error": "insufficient_credit",
  "message": "You're out of API credits right now — top up your balance and I'll pick this right back up."
}

#Credit Limit Exceeded

429credit_limit_exceeded

Returned on any endpoint when the API key's spend for the current period reaches its credit limit. limit, used, and remaining are USD; resets_at is epoch milliseconds.

Examplejson
{
  "error": "credit_limit_exceeded",
  "message": "API key credit limit is exceeded for the current period.",
  "limit": 50,
  "used": 50,
  "remaining": 0,
  "period": "month",
  "resets_at": 1762432496000
}

#Too Many Builds

429build_concurrency_limit

Returned by POST /links when too many builds are already running for the plan. Wait for one to finish, then retry. limit is the concurrent-build allowance.

Examplejson
{
  "error": "build_concurrency_limit",
  "message": "Too many builds running at once for your plan. Wait for one to finish.",
  "limit": 1
}

#Bad Request

400bad_request

Returned for invalid request shape, invalid types, invalid formats, or missing required values.

#Not Found

404not_found

Returned when target file or link does not exist for the authenticated owner.