Skip to main content
POST
Generate content (Gemini)

授權

Authorization
string
header
必填

Your DGrid API key. All endpoints use Authorization: Bearer <DGRID_API_KEY>.

路徑參數

model
string
必填

Target model ID, such as gemini-1.5-pro.

主體

application/json
contents
object[]

Input content array with role and parts.

generationConfig
object

Generation configuration.

回應

Generated content candidates.

candidates
object[]

Candidate responses returned by the model.

usageMetadata
object

Token accounting metadata.