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.
A1 platform has launched over 2200 + apps, including various avatar styles such as comics, dopamine, 3D Disney, various AI portrait applications such as "Barbie", "Sailor Moon", and Christmas themes, as well as a variety of emoji packs, artistic fonts, etc., all 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 to apply to your personal business. For every watermark-free image generated, 1 point will be deducted from your account.
You can earn points by subscribing to the Basic, Pro, or Mega versions, 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:
Get APP information
Upload image (for image to image generation)
Generate images
Get generated results
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}
Request Parameters
Field Name
Type
Location
Is Mandatory
Meaning
apiKey
string
header
Yes
API key
appId
string
path
Yes
Application ID
Parameter limit
Unpublished applications cannot be queried
Applications with digital avatars, wordart, and group photo components cannot be queried.
Request example
Response example
Image
Image
Upload images
/open-api/v1/a1/images/upload
Note: 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
Parameter limit
Only png, jpg and jpeg image files can be uploaded.
Only images can be uploaded through form forms.
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
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
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 5 pairs corresponding to size 1:1 3:4 1:2 4:3 2:1
Parameter limit
You need to bring the latest versionId of the application.
Images stored in this system must be used
The number of images to be generated needs to be transferred (generateNum, 1~ 4). Note: Generate a few images and deduct a few points.
For the parameters in application formArr, pass at least one parameter for each type
When passing a parameter of type description in the form, if the form has an inputs field, the id of the description should be passed as the id of the input
Request example
Response example
Task
Task
/open-api/v1/a1/tasks/{taskId}
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
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
应用版本已更新,请重新获取应用信息
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
无效的文件
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?