curl --request POST \
--url 'https://api.elkapi.com/v1/images/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
}'
import requests
url = "https://api.elkapi.com/v1/images/generations"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/images/generations";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"created": 1,
"data": [
{
"url": "https://example.com/image.png",
"b64_json": "b64_json",
"revised_prompt": "revised_prompt"
}
]
}
Qwen OpenAI 형식
이미지 생성
- Bailian qwen-image 시리즈 이미지 생성
POST
/
v1
/
images
/
generations
curl --request POST \
--url 'https://api.elkapi.com/v1/images/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
}'
import requests
url = "https://api.elkapi.com/v1/images/generations"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/images/generations";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"created": 1,
"data": [
{
"url": "https://example.com/image.png",
"b64_json": "b64_json",
"revised_prompt": "revised_prompt"
}
]
}
curl --request POST \
--url 'https://api.elkapi.com/v1/images/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
}'
import requests
url = "https://api.elkapi.com/v1/images/generations"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/images/generations";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "gpt-image-1.5",
"input": "오늘 날씨가 정말 좋아 산책하기에 좋습니다."
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"created": 1,
"data": [
{
"url": "https://example.com/image.png",
"b64_json": "b64_json",
"revised_prompt": "revised_prompt"
}
]
}
Authorizations
string
필수
모든 엔드포인트는 Bearer Token 인증이 필요합니다.요청 헤더에 추가하세요:
Authorization: Bearer YOUR_API_KEY
Body
string
기본값:"gpt-image-1.5"
필수
예시:
gpt-image-1.5Response
integer
⌘I