AI Guo Guo
  1. Gemini
AI Guo Guo
  • AIGuoGuo
    • About AIGuoGuo
    • Error Msg
    • OpenAI
      • Models
      • Billing
      • Usage
      • Chat
      • Vision
      • Dall-e
      • Speech
    • Gemini
      • Models
        GET
      • Billing
        GET
      • Usage
        GET
      • Chat
        POST
      • Vision-image
        POST
      • Vision-video
        POST
      • Images-Generations
        POST
      • Images-Edits
        POST
      • Image-Chat-Edits
        POST
    • LLM
      • KlingAI
        • Images
        • Video
      • GetThreadsInfo
  1. Gemini

Vision-image

POST
https://api.openai.com/v1/chat/completions

Request

Header Params

Body Params application/json

Example
{
    "model": "gemini-1.5-pro",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "what is this?"
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://www.puzdy.com/wp-content/uploads/2022/07/20211212211533-766fe.jpeg"
                    }
                }
            ]
        }
    ],
    "max_tokens": 300
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/chat/completions' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-1.5-pro",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "what is this?"
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://www.puzdy.com/wp-content/uploads/2022/07/20211212211533-766fe.jpeg"
                    }
                }
            ]
        }
    ],
    "max_tokens": 300
}'

Responses

🟢200成功
application/json
Body

Example
{}
Modified at 2024-12-23 16:35:35
Previous
Chat
Next
Vision-video
Built with