API 参考图片模型Recraft V4 Vector
Recraft V4 Vector 图片 API
通过 PixMind API 使用 Recraft V4 Vector 生成或处理图片。
根据文字提示生成可编辑的 SVG 矢量素材。
提供方
Recraft模型 ID
recraftv4_vector请求端点
POST /api-platform/v1/generations模型说明
- 该线路的 API 价格暂未发布。
- 该线路返回 SVG 格式。
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 稳定的 PixMind 模型 ID,请使用 `recraftv4_vector`。 可选值: |
prompt | string | 是 | 用于生成或编辑的自然语言指令。 |
resolution | string | 否 | 输出分辨率档位,该字段会影响请求价格。 可选值: 默认值: |
n | integer | 否 | 本次请求生成的图片数量。 可选值: 默认值: |
请求示例
cURL
curl https://aihub-admin.aimix.pro/api-platform/v1/generations \
-H "Authorization: Bearer $PIXMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "recraftv4_vector",
"prompt": "A polished campaign image with clean composition and controlled lighting",
"resolution": "1:1"
}'JavaScript
const response = await fetch("https://aihub-admin.aimix.pro/api-platform/v1/generations", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.PIXMIND_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "recraftv4_vector",
"prompt": "A polished campaign image with clean composition and controlled lighting",
"resolution": "1:1"
})
});
const task = await response.json();任务受理响应
生成任务为异步处理。请保存 taskId,并轮询 GET /api-platform/v1/tasks/{taskId},直到状态为 ready 或 failed。
200 OK
{
"code": 1000,
"data": {
"id": "img_44160",
"taskId": 44160,
"type": "image",
"model": "recraftv4_vector",
"status": "processing"
}
}API 定价
| 配置 | 价格 |
|---|---|
| API 价格暂未发布 | — |
API 使用 apiPlatform 角色独立计费,与 PixMind Studio 积分分开;任务受理响应中的价格快照是最终计费依据。