cURL
curl --request POST \ --url https://api.ldx.dev/v1beta/models/{model}:generateContent \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "contents": [ { "role": "user", "parts": [ { "text": "draw a cat" } ] } ], "generationConfig": { "responseModalities": [ "TEXT", "IMAGE" ], "imageConfig": { "aspectRatio": "16:9", "imageSize": "4K" } } } '
{ "candidates": [ { "content": { "role": "<string>", "parts": [ {} ] }, "finishReason": "<string>", "safetyRatings": [ {} ] } ], "usageMetadata": { "promptTokenCount": 123, "candidatesTokenCount": 123, "totalTokenCount": 123 } }
Gemini 图片生成
Documentation IndexFetch the complete documentation index at: https://docs.liandanxia.io/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: https://docs.liandanxia.io/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
模型名称
Show child attributes
成功