获取 API 密钥
文件

POST /api/files/save

POST https://api.iagenify.com/api/files/save

POST /api/files/save 参考。

需要身份验证无 JSON 请求体

HTTP 请求

curl https://api.iagenify.com/api/files/save -X POST -H "Authorization: Bearer $IAGENIFY_TOKEN"

JavaScript

const response = await fetch("https://api.iagenify.com/api/files/save", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IAGENIFY_TOKEN}` }
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);

Python

import os
import requests

response = requests.request("POST", "https://api.iagenify.com/api/files/save", headers={"Authorization": "Bearer " + os.environ["IAGENIFY_TOKEN"]}, timeout=30)
response.raise_for_status()
result = response.json()

响应与错误

成功时,端点返回 JSON。明确列出的状态码:400, 404, 502, 402。错误代码:missing_file_content, storage_not_found, storage_is_local, storage_failed, not_enough_credits。