API For AI Baby Generator
September 10, 2024About 1 min
API For AI Baby Generator
Considerations
- Before using the API, make sure you have obtained the API key. Refer to the link below for instructions on how to obtain it. API For API Key Settings
- All generated images will be automatically deleted after 24 hours. Please make sure to save the images you need to your local storage in a timely manner.
Header Attributes
Parameter | Description |
---|---|
Authorization | Your API Key used for request authorization. |
Create Job
Request Url
--request POST https://developer.remaker.ai/api/remaker/v1/ai-baby/create-job
Body Attributes
Parameter | Type | Required | Description |
---|---|---|---|
dad_photo | file[binary] | false | The image of dad. There has to be a photo of Dad or Mum. (minimum: 0, maximum: 1) |
mom_photo | file[binary] | false | The image of mom. There has to be a photo of Dad or Mum. (minimum: 0, maximum: 1) |
gender | string | true | The gender of generated baby.You can only choose boy or girl. |
num_outputs | int | false | Number of output images Default: 2, (minimum: 1, maximum: 4) |
demo
import requests
url = 'https://developer.remaker.ai/api/remaker/v1/ai-baby/create-job'
headers = {
'accept': 'application/json',
'Authorization': 'your token',
}
files = {
'dad_photo': open('demo01.jpg', 'rb'),
'mom_photo': open('demo02.jpg', 'rb'),
}
payload = {
'gender': 'boy',
'num_outputs': 4
}
response = requests.post(url, headers=headers, data=payload, files=files)
print(response.json()) # Print the response content
Fetch Job
Request Url
--request GET https://developer.remaker.ai/api/remaker/v1/ai-baby/get-job/{job_id}
Body Attributes
Parameter | Description |
---|---|
job_id | job_id returned by create task |
demo
import requests
url = 'https://developer.remaker.ai/api/remaker/v1/ai-baby/get-job/tq52x54205rgp0chv79rq3b35w'
headers = {
'accept': 'application/json',
'Authorization': 'your token',
}
response = requests.get(url, headers=headers)
print(response.json()) # Print the response content
Response
{
"code": 100000,
"result": {
"job_id": "tq52x54205rgp0chv79rq3b35w"
},
"message": {
"en": "Request Success."
}
}
{
"code": 100000,
"result": {
"output": [
"https://image.remaker.ai/datarm/ai-baby/output/2024-09-10/6bd3fd6e-7f5f-44b0-b4c8-9601c0ac34f0.jpg",
"https://image.remaker.ai/datarm/ai-baby/output/2024-09-10/9c660bda-e1e5-4778-a6b6-328c7fbf6df0.jpg",
"https://image.remaker.ai/datarm/ai-baby/output/2024-09-10/c244d568-6362-46d3-ba78-f17c31731914.jpg",
"https://image.remaker.ai/datarm/ai-baby/output/2024-09-10/bee90421-ca44-4f90-8228-9fbf2d13a9c4.jpg"
]
},
"message": {
"en": "Request Success."
}
}