Generate an image with Qwen Image 2.1's parameters
curl --request POST \
--url https://studio.superscore.ai/api/v1/providers/reapi/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"model": "qwen-image-2.1",
"prompt": "A ceramic espresso cup with a cobalt handle, isolated",
"resolution": "1K",
"background": "transparent",
"output_format": "png"
}
'import requests
url = "https://studio.superscore.ai/api/v1/providers/reapi/images/generations"
payload = {
"model": "qwen-image-2.1",
"prompt": "A ceramic espresso cup with a cobalt handle, isolated",
"resolution": "1K",
"background": "transparent",
"output_format": "png"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'qwen-image-2.1',
prompt: 'A ceramic espresso cup with a cobalt handle, isolated',
resolution: '1K',
background: 'transparent',
output_format: 'png'
})
};
fetch('https://studio.superscore.ai/api/v1/providers/reapi/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"outputs": [
{
"index": 123,
"url": "<string>",
"content_type": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
],
"billing": {
"state": "held",
"currency": "USD",
"expected_usd": 123,
"max_usd": 123,
"charged_usd": 123,
"provider_credits": 123,
"superscore_fee_usd": 123,
"rate_version": "<string>",
"quote_id": "<string>"
},
"object": "generation",
"type": "image",
"model": "<string>",
"route": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"outputs": [
{
"index": 123,
"url": "<string>",
"content_type": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
],
"billing": {
"state": "held",
"currency": "USD",
"expected_usd": 123,
"max_usd": 123,
"charged_usd": 123,
"provider_credits": 123,
"superscore_fee_usd": 123,
"rate_version": "<string>",
"quote_id": "<string>"
},
"object": "generation",
"type": "image",
"model": "<string>",
"route": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}API Reference
Generate an image with Qwen Image 2.1's parameters
Send Qwen Image 2.1’s own text-to-image body. Studio handles authentication, dispatch and delivery, and answers with a Studio generation.
POST
/
providers
/
reapi
/
images
/
generations
Generate an image with Qwen Image 2.1's parameters
curl --request POST \
--url https://studio.superscore.ai/api/v1/providers/reapi/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"model": "qwen-image-2.1",
"prompt": "A ceramic espresso cup with a cobalt handle, isolated",
"resolution": "1K",
"background": "transparent",
"output_format": "png"
}
'import requests
url = "https://studio.superscore.ai/api/v1/providers/reapi/images/generations"
payload = {
"model": "qwen-image-2.1",
"prompt": "A ceramic espresso cup with a cobalt handle, isolated",
"resolution": "1K",
"background": "transparent",
"output_format": "png"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'qwen-image-2.1',
prompt: 'A ceramic espresso cup with a cobalt handle, isolated',
resolution: '1K',
background: 'transparent',
output_format: 'png'
})
};
fetch('https://studio.superscore.ai/api/v1/providers/reapi/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"outputs": [
{
"index": 123,
"url": "<string>",
"content_type": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
],
"billing": {
"state": "held",
"currency": "USD",
"expected_usd": 123,
"max_usd": 123,
"charged_usd": 123,
"provider_credits": 123,
"superscore_fee_usd": 123,
"rate_version": "<string>",
"quote_id": "<string>"
},
"object": "generation",
"type": "image",
"model": "<string>",
"route": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"outputs": [
{
"index": 123,
"url": "<string>",
"content_type": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
],
"billing": {
"state": "held",
"currency": "USD",
"expected_usd": 123,
"max_usd": 123,
"charged_usd": 123,
"provider_credits": 123,
"superscore_fee_usd": 123,
"rate_version": "<string>",
"quote_id": "<string>"
},
"object": "generation",
"type": "image",
"model": "<string>",
"route": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"field": "<string>"
}
}Authorizations
Headers
Any unique string of 1–255 printable ASCII characters, with no spaces, such as a UUID. A retry with the same key and body returns the original generation and is never charged twice; the same key with a different body is refused.
Required string length:
1 - 255Pattern:
^[\x21-\x7e]{1,255}$Body
application/json
Qwen Image 2.1's own request body (reAPI), at the top level. Fields not listed are refused by name with 422 unsupported_parameter. Studio sets content_filter: true.
Response
A retry with the same Idempotency-Key whose generation already finished.