API 文档

CopySeal API 参考

将隐形水印集成到您的应用程序中

认证

所有 API 请求需要通过 API 密钥或会话 Cookie 进行认证。请在请求头中包含您的 API 密钥:

Authorization: Bearer wsk_your_api_key_here

API 密钥在 Business 和 Enterprise 套餐中可用。Free 和 Creator 用户可使用 Web 仪表板或基于会话的认证。

嵌入水印

在图片中隐藏隐形水印文本。

POST/embed
将水印嵌入到图片文件中

请求

Content-Type: multipart/form-data

{
  "file":           <binary>,   // Image file (PNG, JPG, WebP, BMP)
  "watermarkText":  "string",   // Text to hide in the image
  "passwordImg":    1,          // Image encryption seed (integer)
  "passwordWm":     1           // Watermark encryption seed (integer)
}

响应

{
  "id":           "uuid",
  "wm_shape":     42,           // Key needed for extraction
  "download_url": "https://...", // Presigned download URL
  "expires_at":   "2024-01-02T00:00:00Z"  // URL expiry (null = permanent)
}

示例(cURL)

curl -X POST https://copyseal.ink/embed \
  -H "Authorization: Bearer wsk_your_api_key" \
  -F "file=@photo.png" \
  -F "watermarkText=Copyright 2024" \
  -F "passwordImg=1" \
  -F "passwordWm=1"

提取水印

从先前嵌入的图片中揭示隐藏的水印。

POST/extract
从图片文件中提取水印

请求

Content-Type: multipart/form-data

{
  "file":        <binary>,  // Image file with embedded watermark
  "wmShape":     42,        // WM Shape key from embedding
  "passwordImg": 1,         // Image encryption seed
  "passwordWm":  1          // Watermark encryption seed
}

响应

{
  "watermark_content": "Copyright 2024"
}

示例(cURL)

curl -X POST https://copyseal.ink/extract \
  -H "Authorization: Bearer wsk_your_api_key" \
  -F "file=@watermarked_photo.png" \
  -F "wmShape=42" \
  -F "passwordImg=1" \
  -F "passwordWm=1"

速率限制

API 速率限制取决于您的订阅套餐。

套餐每月图片数最大文件大小每日 API 调用批量限制
Free55MB----
Creator10025MB--10
Business50050MB10050
Enterprise2,000100MBUnlimited500

错误代码

401未授权 - API 密钥无效或缺失
403禁止 - 您的套餐不包含此功能
429请求过多 - 已达到月度图片限额
500内部服务器错误 - 处理失败

准备好开始了吗?

创建免费账户,开始保护您的图片。