リクエストURLも/302/gpt-image-creative/generate/4に変更できます。リクエストパラメータは2種類のContent-Typeをサポートしています:
application/json
multipart/form-data
Request
Body Params application/json
{
"target_food": "水煮白菜",
"ingredient_list": "白菜, 高汤",
"cooking_steps": "1. 白菜洗净; 2. 放到高汤里煮熟",
"style": "hand_drawn"
}
Request Code Samples
curl --location --request POST 'https://api.302.ai/302/gpt-image-creative/generate/generate_visual_recipe' \
--header 'Authorization: Bearer sk-mfYQzy0XTFfz4P16vRE4gFrKK1Nly4TozsMqbbb9PSiJUvFO' \
--header 'Content-Type: application/json' \
--data-raw '{
"target_food": "水煮白菜",
"ingredient_list": "白菜, 高汤",
"cooking_steps": "1. 白菜洗净; 2. 放到高汤里煮熟",
"style": "hand_drawn"
}'
Responses
application/json {
"task_id": "e45ecd2a-351f-4c0a-a325-372f72469736",
"status": "completed",
"created_at": "2025-09-05T07:12:24.617961Z",
"completed_at": "2025-09-05T07:12:50.695154Z",
"image_url": "https://file.302.ai/gpt/imgs/20250905/e8e571be604e9ccd5c535f8499d284b4.png"
}
Modified at 2025-09-08 03:15:17