Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl https://models.kapon.cloud/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "model": "jimeng-4.0", "prompt": "一只可爱的熊猫在图书馆看书", "n": 1, "size": "1024x1024" }'
from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://models.kapon.cloud/v1" ) response = client.images.generate( model="jimeng-4.0", prompt="一只可爱的熊猫在图书馆看书", n=1, size="1024x1024" ) print(response.data[0].url)
{ "created": 1700000000, "data": [ { "url": "https://cdn.example.com/images/abc123.png" } ] }
即梦模型的 API 接口说明和常见问题排查
https://models.kapon.cloud
Authorization: Bearer YOUR_API_KEY
POST /v1/images/generations
POST /v1/images/edits
jimeng-4.0
jimeng-3.0
jimeng-agent
1024x1024
1024x1792
1792x1024
multipart/form-data
curl https://models.kapon.cloud/v1/images/edits \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "image=@input.png" \ -F "model=jimeng-4.0" \ -F "prompt=添加科幻元素" \ -F "n=1"
from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://models.kapon.cloud/v1" ) with open("input.png", "rb") as image_file: response = client.images.edit( image=image_file, model="jimeng-4.0", prompt="添加科幻元素", n=1 ) print(response.data[0].url)