curl --request POST \
--url https://api.tikway.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "diffusion-4-5-full",
"prompt": "A serene Japanese garden at dawn, mist above a koi pond, cinematic lighting, highly detailed",
"negative_prompt": "lowres, blurry, text, watermark",
"size": "1024x1536",
"n": 1,
"steps": 28,
"scale": 5,
"sampler": "Euler Ancestral",
"noise_schedule": "karras"
}
'{
"created": 1713833628,
"background": "opaque",
"data": [
{
"b64_json": "...",
"index": 0
}
],
"output_format": "png",
"size": "1024x768"
}图片生成
diffusion-4-5-full 与 diffusion-4-5-curated 使用相同参数集:prompt、images、negative_prompt、n、size、seed、steps、scale、quality_toggle、sampler、noise_schedule、character_prompts、hook_url 和 response_format。
n 为 1~4。普通图生图源图最多 1 张;vibe_transfer 与 character_reference 不能同时使用。NovelAI 没有独立 JSON 编辑端点,编辑仍通过本生成端点的 images 完成。
curl --request POST \
--url https://api.tikway.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "diffusion-4-5-full",
"prompt": "A serene Japanese garden at dawn, mist above a koi pond, cinematic lighting, highly detailed",
"negative_prompt": "lowres, blurry, text, watermark",
"size": "1024x1536",
"n": 1,
"steps": 28,
"scale": 5,
"sampler": "Euler Ancestral",
"noise_schedule": "karras"
}
'{
"created": 1713833628,
"background": "opaque",
"data": [
{
"b64_json": "...",
"index": 0
}
],
"output_format": "png",
"size": "1024x768"
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
NovelAI 图片生成 Request Body。统一参考图使用 images;网关负责转换为 TTAPI NovelAI 原生参数。
必填。TTAPI 当前接入的 NovelAI Diffusion V4.5 模型。
diffusion-4-5-full, diffusion-4-5-curated 1"diffusion-4-5-full"
"diffusion-4-5-curated"
正向提示词。
1 - 32000可选。统一参考图数组。type=image(或省略)为单张图生图源图;type=vibe_transfer 为氛围参考;type=character_reference 为精确角色/风格参考。只能有 1 张普通图生图源图,vibe_transfer 与 character_reference 不能混用。
16Hide child attributes
Hide child attributes
1image 或 null 为图生图源图;其余值表示 NovelAI 参考图类型。
image, vibe_transfer, character_reference, null 参考强度。图生图最大值为 0.99。
0 <= x <= 1保真度。图生图会转换为 noise = 1 - fidelity。
0 <= x <= 1仅 character_reference 使用。
character, style, character&style 负向提示词。
生成图片数量。
1 <= x <= 4输出尺寸,网关转换为 width 和 height。
^[1-9][0-9]*x[1-9][0-9]*$随机种子。
采样步数。
x >= 1提示词引导强度。
质量开关。
Euler Ancestral, Euler, DPM++ 2S Ancestral, DPM++ 2M SDE, DPM++ 2M, DPM++ SDE karras, exponential, polyexponential 固定返回 Base64 图片,使响应符合本接口的 Response Schema。
b64_json, url 可选。TTAPI 任务完成或失败时的回调地址。
响应
网关完成图片转换时的 Unix 时间戳(秒)。
根据统一入站请求推断的背景设置;NovelAI 原始响应通常不回显。
transparent, opaque 从下载图片 MIME 类型或请求 output_format 推断出的格式。
png, jpeg, webp 统一质量字段;若请求提供 quality,网关会映射后回显。
low, medium, high 原始请求的 size;NovelAI 原始响应通常不回显。