Documentation Index
Fetch the complete documentation index at: https://docs.apigo.ai/llms.txt
Use this file to discover all available pages before exploring further.
推奨されるエンドポイント
最低限のお願い
{
"model": "gpt-image-1",
"prompt": "A clean ApiGo product poster",
"size": "1024x1024",
"n": 1
}
cURLの例
curl https://maas.apigo.ai/v1/images/generations \
-H "Authorization: Bearer $YOUR API KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-1",
"prompt": "A clean ApiGo product poster",
"size": "1024x1024",
"n": 1
}'
Python の例
from openai import OpenAI
client = OpenAI(
base_url="https://maas.apigo.ai/v1",
api_key="<YOUR API KEY>",
)
response = client.images.generate(
model="gpt-image-1",
prompt="A clean ApiGo product poster",
size="1024x1024",
n=1,
)
print(response.data[0])
Node.js の例
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://maas.apigo.ai/v1",
apiKey: process.env.YOUR API KEY,
});
const response = await client.images.generate({
model: "gpt-image-1",
prompt: "A clean ApiGo product poster",
size: "1024x1024",
n: 1
});
console.log(response.data[0]);
ベストプラクティス
- 画像生成と画像編集を別々のエンドポイントで維持する
- 反復編集の場合、ソースアセット ID または以前の出力をサーバー側に保持します。
- 1 つのバックエンド アセット レイヤーでの URL および Base64 処理を正規化します。