English Version
Introduction
Welcome to join A1's developer platform and explore the infinite possibilities of AIGC together!
A1.art is committed to providing a variety of image generation apps to help developers easily integrate and use image generation technology to meet different business needs.
The a1 platform has launched more than 27,000 image generation applications, including a variety of avatar styles such as comics, dopamine, 3D Disney, various AI portrait applications such as "Barbie" and "Genshin Impact", as well as a wide variety of emoticons, artistic fonts, etc. a1.art adds hundreds of high-quality applications every month. You can input a picture or a sentence to generate portrait results or beautiful pictures of different styles. Waiting for you to explore!
By calling our API, you can quickly integrate the photo app into your application or service, enhancing User Experience and product value.
Our platform features include:
Diversified image generation applications : Provide a variety of image generation applications to meet the needs of different scenarios.
Easy integration : Integrate powerful image generation capabilities into your project with a simple API call.
Efficient performance : Optimized algorithms and server architecture ensure fast response and high-quality image output.
Flexible customization : supports multiple parameter settings to meet personalized image generation needs.
Whether you want to provide personalized image generation services for your users or need to automatically generate images in internal systems, our platform can provide powerful support for you.
API Charging Rules
The API interface will generate watermark-free images for you, so that you can use the images in your personal business. There are two types of image generation applications on the a1.art site: node apps and form apps.
For each watermark-free image generated by calling the form-based application through the API, 1 point will be deducted from your account.
The point consumption of the node-based application API is deducted according to the number of generator nodes. For details, please refer to each APP API Request window.
For each refined drawing of an image by calling the image through the API, 3 points are consumed (up to 2K output is supported)
You can subscribe to a1.art through a Visa card to obtain points, or contact us directly to discuss setting up a custom plan.
Please pay attention to keeping the account balance sufficient to avoid call failure affecting the normal use of your business
For more subscription-related content, please refer to
What capabilities does the API provide?
API currently provides 4 interfaces:
Upload image interface: If the user uses the image generation function, he needs to call this interface to upload the image before he can get the parameters that the image generation depends on
Image generation interface: The user passes in the parameters that the image generation depends on, and can get a taskId. The image generation result can be queried through the taskId
Enhance interface: HD processing of the passed image is similar to the image generation interface. After getting the taskId, the image generation result can be queried through the taskId
Image generation result query interface: Pass in the taskId to query the image generation result
Basic introduction
Access authorization
Prefix
https://a1.art
Note: If you encounter problems with registration in China, you can try using the domain name https://a1art.xiaopiu.com
Request specification
Network protocol:
HTTPS
protocol.Encoding format:
UTF-8
encoding.Request header: You must carry
apiKey
for background authentication and authentication. (Get API key)Response result:
JSON
data format. The response body structure of the API includes four parts:code, msg, msg_cn, and data
.Code
is the error code,msg
is the English error description,msg_cn
is the Chinese error description, anddata
is the result returned after calling the API; if thecode
is not0
, the request is considered to have failed, and the failure information can refer tomsg
andmsg_cn
.
Response body
Parameter name
Type
Description
code
int
Error code
msg
string
English Error Message
msg_cn
string
Chinese Error Message
data
json
Response data
Data structure
Application
Form
Input
Style
Size
Task
API key
API key
To issue an authorization request as a user, you must use an API key.
You can find and manage your API key from the personal avatar in the upper right corner of the website
Application
Application
Get Application Details
/open-api/v1/a1/apps/{appId}
& GET
Request Parameters
Field Name
Type
Location
Is Mandatory
Meaning
apiKey
string
header
Yes
API key
appId
string
path
Yes
Application ID
language
string
query
No
Language, if not transmitted, it is assumed to be the text used when publishing. Supported translations include zh_CN, en_US, zh_TW, ru_RU, ja_JP, pt_BR, es_MX, de_DE, id_ID, tr_TR, vi_VN, th_TH, ms_MY
Parameter limit
It does not support querying apps with digital avatar components, wordart components, group photo components in user upload mode (most group photo apps are not included in this scope), and video components
It does not support querying unpublished node app information
Response example
Image
Image
Upload images:/open-api/v1/a1/images/upload
& POST
/open-api/v1/a1/images/upload
& POSTNote: Only images uploaded through our system can be used as raw image parameters.
Request Parameters
Field Name
Type
Location
Is Mandatory
Meaning
apiKey
string
header
yes
API key
file
file
form-data
yes
Image file
imageUrl
string
form-data
yes
Image Link
Parameter limit
Only png, jpg and jpeg image files can be uploaded.
Only images can be uploaded through form forms.
Support uploading pictures via online picture links
Only one image can be uploaded at a time
Image file size cannot be greater than 10 MB
Request example
Response example
Generate images
/open-api/v1/a1/images/generate
& POST
Note: Node apps have separate point consumption rules
Request Parameters
Field Name
Type
Location
Is Mandatory
Meaning
apiKey
string
header
Yes
API key
appId
string
body
Yes
Application id
versionId
string
body
Yes
Application version id
generateNum
string
body
Yes
Number of images to be generated in this request
cnet
[]cnetForm
body
No
| Pictures relied on for Image-to-image |
string
body
Yes
id of the form of type cnet in formArr
cnetForm.imageUrl
string
body
Yes
See the return value of the upload image interface
cnetForm.path
string
body
Yes
See the return value of the upload image interface
cnetForm.position
string
body
No
Group photo image index position (this field must be passed when using the group photo function, indicating that the image will be attached to the specified position of the group photo - the index starts from 0)
description
[]descriptionForm
body
No
Descriptors relying on real-life photos
string
body
Yes
id of the form of type description in formArr (if there is an input field, it is the id of the input)
descriptionForm.value
string
body
Yes
Description words
styleId
string
body
No
The image style of the raw image depends on the source - the id in styleArr.
size
sizeForm
body
No
Original image size dependencies
sizeForm.sizeId
string
body
Yes
1 to 7 pairs corresponding to size 1:1 3:4 1:2 4:3 2:1 16:9 9:16
Parameter limit
You need to bring the latest versionId of the application
It is not currently supported to use unpublished node-based applications to generate images
You must use images stored in this system
You need to pass the number of images to be generated (generateNum, 1~4) Note: Node-based applications can only generate one image at a time
For the parameters in the application formArr, pass at least one parameter of each type
When passing a parameter of type description in the form, if the form has an inputs field, the description id should be the input id
Request example
Response example
Enchance Image:/open-api/v1/a1/images/optimize& POST
Request Parameters
Field Name
Type
Location
Is Mandatory
Meaning
apiKey
string
header
Yes
API key
path
string
body
Yes
See the return value of the upload image API.
imageUrl
string
body
Yes
See the return value of the upload image API.
Parameter limit
You must use images stored in this system
Each image drawing consumes 3 points
The size limit of the drawing image is 2048 * 2048
Request example
Response example
The response structure is the same as the generated image
Task
Task
/open-api/v1/a1/tasks/{taskId}
& GET
Note: The generated image address may become invalid later. It is recommended to save the generated result on your own CDN.
Note:
You can wait for 5 seconds and then query the result through polling
The state enum of task can be seen in TaskStateType
Query task execution results
Request Parameters
Field Name
Type
Location
Is Mandatory
Meaning
apiKey
string
header
Yes
API key
section
string
header
No
The region to which the image resource belongs. For China, please use cn. Other regions do not need to use cn.
taskId
string
path
Yes
taskId returned by the generate image interface
Parameter limit
Only query tasks under the current user ID
Request example
Response example
Error code
code
msg
msg_cn
0
success
成功
10001
invalid params
无效的参数
10002
unsupported image suffix
不支持的文件后缀
10410
Missing API key
缺少API key
10411
Invalid API key
无效的API key
20000
too may request
接口访问触发限流
20002
server error
服务器错误
20003
service internal error
服务内部错误
20100
file error
文件异常
20101
file suffix error
文件后缀异常
324010
This app does not support API access
此应用不支持通过API访问
324011
The quantity must not exceed 4
单个应用单次请求生图数量1~4张
324012
This app does not exist
无效的应用ID
324013
The application is updated. You need to obtain the application information again
应用版本已更新,请重新获取应用信息
324018
You can only use API of your built apps.
调用他人的未发布应用api
400000
Missing image file
缺少图片文件
400001
Only one image can be uploaded at a time
一次只支持上传一张图片
400002
Non image format files are not supported
不支持非图片格式文件
400003
The image file cannot exceed 10M
图片文件不能超过10M
400004
Invalid file
无效的文件
400005
This image format is not supported
不支持该图片格式
400006
The size of the image file cannot exceed 2048*2048
图片文件尺寸不能超过 2048*2048
324019
No rights to use VIP app*Available after payment
没有使用 vip app 的权益*付费后可用
810012
balance insufficient error
账户余额不足
Contact us
Join our Discord community to communicate with our team and get quick assistance with your issues.
For any questions, send us an email at contact@A1.art, and we will respond within 2 business days.
Follow our X account: @A1.art
Last updated
Was this helpful?