---
title: "Gemini Native Format"
method: POST
path: "/v1beta/models/{model}:{method}"
tags: ["Text Series"]
---

# Gemini Native Format

`POST /v1beta/models/{model}:{method}`

## Request

- Base URL: `https://api.poyo.ai`
- URL: `https://api.poyo.ai/v1beta/models/{model}:{method}`
- Auth: HTTP bearer

Use the native Gemini request/response format.

## Path parameters

- `model` string, required
- `method` 'generateContent' | 'streamGenerateContent', required

## Request body

- GeminiGenerateContentRequest
  - `contents` GeminiContent[], required: Conversation contents with roles and parts. Each content object may include a `role` (`user` or `model`) and a `parts` array containing text or inline data.
    - `role` 'user' | 'model', required: Role type. Use `user` for user input and `model` for model output.
    - `parts` GeminiPart[], required: Parts list. Each part can contain text or inline data.
      - union: A part can contain text or inline data.
        - object
          - `text` string, required
        - object
          - `inlineData` GeminiInlineData, required
            - `mimeType` string, required
            - `data` string, required: Base64-encoded data.
  - `generationConfig` GeminiGenerationConfig: Generation configuration.
    - `temperature` number: Controls output randomness.
    - `topP` number: Nucleus sampling parameter.
    - `topK` integer: Top-k sampling parameter.
    - `maxOutputTokens` integer: Maximum output tokens.
    - `stopSequences` string[]: Stop sequences.
  - `safetySettings` GeminiSafetySetting[]: Safety settings.
    - `category` string: Safety category.
    - `threshold` string: Blocking threshold.

## Response `200`

Content generated

- GeminiGenerateContentResponse
  - `code` integer
  - `data` GeminiGenerateContentResult
    - `candidates` GeminiCandidate[]
      - `content` GeminiContent
        - `role` 'user' | 'model', required: Role type. Use `user` for user input and `model` for model output.
        - `parts` GeminiPart[], required: Parts list. Each part can contain text or inline data.
          - union: A part can contain text or inline data.
            - object
              - …
            - object
              - …
      - `finishReason` string
      - `index` integer
      - `safetyRatings` GeminiSafetyRating[]
        - `category` string
        - `probability` string
    - `promptFeedback` GeminiPromptFeedback
      - `safetyRatings` GeminiSafetyRating[]
        - `category` string
        - `probability` string
  - `usageMetadata` GeminiUsageMetadata
    - `promptTokenCount` integer
    - `candidatesTokenCount` integer
    - `totalTokenCount` integer
    - `thoughtsTokenCount` integer
    - `promptTokensDetails` GeminiTokenDetail[]
      - `modality` string
      - `tokenCount` integer

---

[API](https://skmtc.dev/poyo/apis/poyo-ai-hunyuan-3d-v3-1-api.md) - [All operations](https://skmtc.dev/poyo/apis/poyo-ai-hunyuan-3d-v3-1-api/llms.txt) - [OpenAPI document](https://skmtc.dev/poyo/apis/poyo-ai-hunyuan-3d-v3-1-api/revisions/4b46904b78eb?raw)
