curl --request POST \
--url https://www.gostudio.ai/api/v2/photo/recreate-group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference_image_url": "https://example.com/group-scene.jpg",
"profile_ids": [
42,
43,
44
],
"aspect_ratio": "16:9"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_image_url: 'https://example.com/group-scene.jpg',
profile_ids: [42, 43, 44],
aspect_ratio: '16:9'
})
};
fetch('https://www.gostudio.ai/api/v2/photo/recreate-group', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.gostudio.ai/api/v2/photo/recreate-group"
payload = {
"reference_image_url": "https://example.com/group-scene.jpg",
"profile_ids": [42, 43, 44],
"aspect_ratio": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 200,
"data": {
"kind": "generation",
"job_id": "enc_abc123",
"credits_deducted": 10,
"credit_balance": 490,
"created_at": "2023-11-07T05:31:56Z",
"output_urls": [
"<string>"
],
"profile_ids": [
42,
43,
44
]
}
}{
"status": 400,
"error": {
"type": "validation_error",
"code": "invalid_input",
"dev": 40001,
"message": "Some information is invalid."
}
}{
"status": 401,
"error": {
"type": "authentication_error",
"code": "unauthorized",
"dev": 40100,
"message": "Missing or invalid Authorization Bearer token."
}
}{
"status": 402,
"error": {
"type": "billing_error",
"code": "insufficient_credits",
"dev": 40200,
"message": "You don't have enough credits."
}
}{
"status": 403,
"error": {
"type": "permission_error",
"code": "forbidden",
"dev": 40300,
"message": "You don't have permission for this action."
}
}{
"status": 404,
"error": {
"type": "trained_profile_not_found",
"code": 40403,
"message": "Trained profile not found."
}
}{
"status": 429,
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"dev": 42900,
"message": "You're doing that too often. Please wait a moment."
}
}{
"status": 500,
"error": {
"type": "system_error",
"code": "internal_error",
"dev": 50000,
"message": "Something went wrong on our end."
}
}{
"status": 502,
"error": {
"type": "provider_error",
"code": "provider_bad_gateway",
"dev": 50200,
"message": "Generation is having trouble right now. Please try again."
}
}Recreate a group photo using trained profiles
Generates a group photo by placing 2–10 trained profiles into a scene derived from a reference image. The aspect ratio is auto-detected from the reference image; an explicit aspect_ratio parameter overrides it.
At least 2 valid, ready profiles must be provided. If fewer than 2 pass validation, the request returns trained_profile_not_found. Credits are deducted before generation begins and refunded if the job fails.
curl --request POST \
--url https://www.gostudio.ai/api/v2/photo/recreate-group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference_image_url": "https://example.com/group-scene.jpg",
"profile_ids": [
42,
43,
44
],
"aspect_ratio": "16:9"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_image_url: 'https://example.com/group-scene.jpg',
profile_ids: [42, 43, 44],
aspect_ratio: '16:9'
})
};
fetch('https://www.gostudio.ai/api/v2/photo/recreate-group', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.gostudio.ai/api/v2/photo/recreate-group"
payload = {
"reference_image_url": "https://example.com/group-scene.jpg",
"profile_ids": [42, 43, 44],
"aspect_ratio": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 200,
"data": {
"kind": "generation",
"job_id": "enc_abc123",
"credits_deducted": 10,
"credit_balance": 490,
"created_at": "2023-11-07T05:31:56Z",
"output_urls": [
"<string>"
],
"profile_ids": [
42,
43,
44
]
}
}{
"status": 400,
"error": {
"type": "validation_error",
"code": "invalid_input",
"dev": 40001,
"message": "Some information is invalid."
}
}{
"status": 401,
"error": {
"type": "authentication_error",
"code": "unauthorized",
"dev": 40100,
"message": "Missing or invalid Authorization Bearer token."
}
}{
"status": 402,
"error": {
"type": "billing_error",
"code": "insufficient_credits",
"dev": 40200,
"message": "You don't have enough credits."
}
}{
"status": 403,
"error": {
"type": "permission_error",
"code": "forbidden",
"dev": 40300,
"message": "You don't have permission for this action."
}
}{
"status": 404,
"error": {
"type": "trained_profile_not_found",
"code": 40403,
"message": "Trained profile not found."
}
}{
"status": 429,
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"dev": 42900,
"message": "You're doing that too often. Please wait a moment."
}
}{
"status": 500,
"error": {
"type": "system_error",
"code": "internal_error",
"dev": 50000,
"message": "Something went wrong on our end."
}
}{
"status": 502,
"error": {
"type": "provider_error",
"code": "provider_bad_gateway",
"dev": 50200,
"message": "Generation is having trouble right now. Please try again."
}
}Authorizations
Supabase user JWT (or an internal service token). Send as Authorization: Bearer <token>.
Body
HTTPS URL of the reference group scene image.
"https://example.com/group-scene.jpg"
IDs of trained profiles for group members. Minimum 2, maximum 10.
2 - 10 elements[42, 43, 44]
Number of images to generate.
1 <= x <= 4Output aspect ratio. Auto-detected from the reference image if omitted.
1:1, 3:4, 4:3, 9:16, 16:9 "16:9"
Output resolution.
1K, 2K, 4K Output image format.
png, jpg Additional generation instructions.

