QuiverAI — AI Vector Graphics
QuiverAI generates production-ready SVGs from text prompts or raster images.
- Site: https://quiver.ai Docs: https://docs.quiver.ai API base: INLINECODE0 Model: INLINECODE1 Auth: Bearer token via INLINECODE2 Billing: 1 credit per request (regardless of n).
Setup
Get an API key at https://app.quiver.ai/settings/api-keys (create account at https://quiver.ai/start first).
Text to SVG
Generate SVGs from a text description.
Endpoint: INLINECODE4
CODEBLOCK0
Node.js SDK (npm install @quiverai/sdk):
CODEBLOCK1
Parameters
Param Type Default Description INLINECODE6 string — Required. Use arrow-preview. INLINECODE8
string | — | Required. Describes the desired SVG. |
|
instructions | string | — | Additional style guidance (e.g. "flat monochrome, rounded corners"). |
|
references | array | — | Up to 4 reference images (
{ url } or
{ base64 }). |
|
n | int | 1 | Number of outputs (1–16). |
|
temperature | float | 1 | Sampling temperature (0–2). Lower = more deterministic. |
|
top_p | float | 1 | Nucleus sampling (0–1). |
|
max_output_tokens | int | — | Upper bound for output tokens (max 131072). |
|
stream | bool | false | SSE streaming (events:
reasoning,
draft,
content). |
Response
CODEBLOCK2
Image to SVG (Vectorize)
Convert a raster image (PNG/JPEG/WebP) into SVG.
Endpoint: INLINECODE21
CODEBLOCK3
SDK:
CODEBLOCK4
Additional parameters (beyond Text-to-SVG shared ones)
Param Type Default Description INLINECODE22 object — Required. { url: "..." } or { base64: "..." }. INLINECODE25
bool | false | Crop to dominant subject before vectorization. |
|
target_size | int | — | Square resize target in px (128–4096) before inference. |
Response format is identical to Text-to-SVG.
Error codes
Status Code Meaning 400 INLINECODE27 Malformed body or missing fields. 401
unauthorized | Bad or missing API key. |
| 402 |
insufficient_credits | Out of credits. |
| 429 |
rate_limit_exceeded | Too many requests; back off and retry. |
Tips
- Save SVG output to a .svg file for immediate use. Use instructions to control style without changing the prompt. For logos, try low temperature (0.3–0.5) for cleaner, more consistent results. Use references to provide visual examples the model should match. For vectorization, enable auto_crop: true when the source image has excess whitespace.
QuiverAI — AI矢量图形
QuiverAI可根据文本提示或光栅图像生成可直接使用的SVG文件。
- 网站:https://quiver.ai 文档:https://docs.quiver.ai API基础地址:https://api.quiver.ai/v1 模型:arrow-preview 认证:通过QUIVERAIAPI KEY使用Bearer令牌 计费:每次请求消耗1积分(无论n值大小)。
设置
在https://app.quiver.ai/settings/api-keys获取API密钥(请先在https://quiver.ai/start创建账户)。
文本转SVG
根据文本描述生成SVG文件。
端点: POST /v1/svgs/generations
bash
curl -X POST https://api.quiver.ai/v1/svgs/generations \
-H Authorization: Bearer $QUIVERAIAPI KEY \
-H Content-Type: application/json \
-d {
model: arrow-preview,
prompt: 使用字母Q的极简字母组合标志,
n: 1,
stream: false
}
Node.js SDK(npm install @quiverai/sdk):
typescript
import { QuiverAI } from @quiverai/sdk;
const client = new QuiverAI({ bearerAuth: process.env.QUIVERAIAPI KEY });
const result = await client.createSVGs.generateSVG({
model: arrow-preview,
prompt: 使用字母Q的极简字母组合标志,
});
// result.data[0].svg 包含SVG标记
参数
参数 类型 默认值 描述 model 字符串 — 必填。使用arrow-preview。 prompt
字符串 | — | 必填。描述所需的SVG。 |
| instructions | 字符串 | — | 额外的样式指导(例如扁平单色,圆角)。 |
| references | 数组 | — | 最多4张参考图像({ url }或{ base64 })。 |
| n | 整数 | 1 | 输出数量(1–16)。 |
| temperature | 浮点数 | 1 | 采样温度(0–2)。值越低越确定。 |
| top_p | 浮点数 | 1 | 核采样(0–1)。 |
| max
output tokens | 整数 | — | 输出令牌上限(最大131072)。 |
| stream | 布尔值 | false | SSE流式传输(事件:reasoning、draft、content)。 |
响应
json
{
id: resp_01J...,
created: 1704067200,
data: [{ svg: ... , mime_type: image/svg+xml }],
usage: { totaltokens: 1640, input tokens: 1200, output_tokens: 440 }
}
图像转SVG(矢量化)
将光栅图像(PNG/JPEG/WebP)转换为SVG。
端点: POST /v1/svgs/vectorizations
bash
curl -X POST https://api.quiver.ai/v1/svgs/vectorizations \
-H Authorization: Bearer $QUIVERAIAPI KEY \
-H Content-Type: application/json \
-d {
model: arrow-preview,
stream: false,
image: { url: https://example.com/logo.png }
}
SDK:
typescript
const result = await client.vectorizeSVG.vectorizeSVG({
model: arrow-preview,
image: { url: https://example.com/logo.png },
});
额外参数(除文本转SVG共享参数外)
参数 类型 默认值 描述 image 对象 — 必填。{ url: ... }或{ base64: ... }。 auto_crop
布尔值 | false | 在矢量化前裁剪至主要主体。 |
| target_size | 整数 | — | 推理前的正方形缩放目标像素(128–4096)。 |
响应格式与文本转SVG相同。
错误代码
状态码 代码 含义 400 invalid_request 请求体格式错误或缺少字段。 401
unauthorized | API密钥错误或缺失。 |
| 402 | insufficient_credits | 积分不足。 |
| 429 | rate
limit exceeded | 请求过多;请等待后重试。 |
提示
- 将SVG输出保存为.svg文件即可直接使用。 使用instructions控制样式,无需更改提示词。 对于标志设计,尝试较低的温度值(0.3–0.5)以获得更清晰、更一致的结果。 使用references提供模型应匹配的视觉示例。 进行矢量化时,如果源图像有过多空白区域,请启用auto_crop: true。