阅丞集团图片生成API文档
基于阅丞自研的Yuecheng-VisGen/VisGen模型,提供高质量的AI图片生成服务,支持多种自定义参数
立即购买API密钥API概述
阅丞集团图片生成API基于我们自研的Yuecheng-VisGen/VisGen模型,提供高质量的AI图片生成服务。支持多种自定义参数,让您轻松生成高质量的AI图片。
API访问地址
POST https://ycceo.com/API/AI-picture/endpoint_pic.php
请求参数
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| api_key | string | 是 | 您的API密钥(以yc-pic-开头) |
| prompt | string | 是 | 图片生成提示词 |
| model | string | 否 | 图片生成模型,默认: Yuecheng-VisGen/VisGen |
| image_size | string | 否 | 图片尺寸,默认: 1024x1024 |
| negative_prompt | string | 否 | 负面提示词 |
| batch_size | integer | 否 | 生成图片数量(1-4),默认: 1 |
| seed | integer | 否 | 随机种子(0-9999999999) |
| num_inference_steps | integer | 否 | 推理步数(1-100),默认: 20 |
| guidance_scale | number | 否 | 引导比例(0-20),默认: 7.5 |
请求示例
cURL
curl -X POST \
"https://ycceo.com/API/AI-picture/endpoint_pic.php" \
-H "Content-Type: application/json" \
-d '{
"api_key": "yc-pic-your-api-key-here",
"prompt": "一只可爱的猫咪在花园里玩耍,阳光明媚",
"model": "Yuecheng-VisGen/VisGen",
"image_size": "1024x1024",
"batch_size": 1
}'
JavaScript
const response = await fetch("https://ycceo.com/API/AI-picture/endpoint_pic.php", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
api_key: "yc-pic-your-api-key-here",
prompt: "一只可爱的猫咪在花园里玩耍,阳光明媚",
model: "Yuecheng-VisGen/VisGen",
image_size: "1024x1024",
batch_size: 1
})
});
const data = await response.json();
Python
import requests
import json
url = "https://ycceo.com/API/AI-picture/endpoint_pic.php"
payload = {
"api_key": "yc-pic-your-api-key-here",
"prompt": "一只可爱的猫咪在花园里玩耍,阳光明媚",
"model": "Yuecheng-VisGen/VisGen",
"image_size": "1024x1024",
"batch_size": 1
}
response = requests.post(url, json=payload)
data = response.json()
响应格式
成功响应
{
"success": true,
"images": [
{
"url": "https://siliconflow.com/generated/image1.jpg"
}
],
"model": "Yuecheng-VisGen/VisGen",
"images_generated": 1,
"api_usage": {
"used_images": 15,
"remaining_images": 85
},
"timings": {
"inference": 2.34
},
"seed": 123456789
}
错误响应
{
"success": false,
"error": "错误描述信息"
}
HTTP状态码
400 - Bad Request
请求语法错误或缺少必要参数
401 - Unauthorized
API密钥无效或不存在
403 - Forbidden
API密钥已被禁用或权限不足
404 - Not Found
请求的资源不存在
429 - Too Many Requests
请求过于频繁或超过使用限制
451 - Unavailable For Legal Reasons
因法律原因不可用,请求内容可能违反相关法律法规
500 - Internal Server Error
服务器内部错误,无法处理请求
502 - Bad Gateway
网关错误,上游服务不可用
503 - Service Unavailable
服务暂时不可用,请稍后重试
支持的图片尺寸
| 尺寸 | 比例 | 适用模型 |
|---|---|---|
| 1024x1024 | 1:1 | Yuecheng-VisGen/VisGen |
| 960x1280 | 3:4 | Yuecheng-VisGen/VisGen |
| 768x1024 | 3:4 | Yuecheng-VisGen/VisGen |
| 720x1280 | 9:16 | Yuecheng-VisGen/VisGen |
| 720x1440 | 1:2 | Yuecheng-VisGen/VisGen |
计费说明
价格详情
- 每成功生成一张图片计费0.2元
- 图片生成失败不计费
- 新用户免费赠送30张 限时优惠
- 活动期间可能额外赠送更多免费额度
- 支持设置最大图片生成数量限制
- 超过限制后将无法继续生成图片