Skip to main content
POST
/
v1beta
/
models
/
{model}
:
{method}
Gemini Native Format
curl --request POST \
  --url https://api.poyo.ai:{method}/v1beta/models/{model}:62437 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Summarize the 'new night mode' requirements in 3 points and provide next steps."
        }
      ]
    }
  ]
}
EOF
{
  "code": 200,
  "data": {
    "candidates": [
      {
        "content": {
          "role": "model",
          "parts": [
            {
              "text": "Hello! I'm pleased to introduce myself."
            }
          ]
        },
        "finishReason": "STOP",
        "index": 0
      }
    ],
    "promptFeedback": {
      "safetyRatings": [
        {
          "category": "HARM_CATEGORY_HATE_SPEECH",
          "probability": "NEGLIGIBLE"
        },
        {
          "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
          "probability": "NEGLIGIBLE"
        },
        {
          "category": "HARM_CATEGORY_HARASSMENT",
          "probability": "NEGLIGIBLE"
        },
        {
          "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
          "probability": "NEGLIGIBLE"
        }
      ]
    }
  },
  "usageMetadata": {
    "promptTokenCount": 15,
    "candidatesTokenCount": 29,
    "totalTokenCount": 44,
    "thoughtsTokenCount": 0,
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 15
      }
    ]
  }
}
  • Call Gemini models using Google Native API format
  • Synchronous processing mode with real-time response
  • Minimal parameters for quick start

Authorizations

Authorization
string
required
All API endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:
Authorization: Bearer PoYo_API_KEY

Path Parameters

model
string
required
Gemini model name. Example: gemini-3-flash-preview
method
enum<string>
required
Request method
  • generateContent
  • streamGenerateContent

Body

contents
array
required
Conversation contents with roles and partsExample:
[
  {
    "role": "user",
    "parts": [{"text": "Summarize the goals of the new 'night mode' in one sentence."}]
  }
]
generationConfig
object
Generation configuration
safetySettings
array
Safety settings

Response

candidates
array
Generated candidates
promptFeedback
object
Prompt safety feedback
usageMetadata
object
Token usage metadata

Authorizations

Authorization
string
header
required

All API endpoints require Bearer Token authentication.

Get your API Key:

Visit the API Key Management Page to get your API Key

Add it to the request header:

Authorization: Bearer YOUR_API_KEY

Path Parameters

model
string
required

Gemini model name.

Example:

"gemini-3-flash-preview"

method
enum<string>
required

Request method: generateContent or streamGenerateContent.

Available options:
generateContent,
streamGenerateContent
Example:

"generateContent"

Body

application/json
contents
object[]
required

Conversation contents with roles and parts.

generationConfig
object
safetySettings
object[]

Response

200 - application/json

Content generated

code
integer
Example:

200

data
object
usageMetadata
object