gemini-pro

This documentation is valid for the following list of our models:

  • gemini-pro

Model Overview

A state-of-the-art multimodal AI model designed to process and generate text, images, audio, and video. It leverages advanced machine learning techniques to understand and generate complex data types, making it suitable for a variety of applications in natural language processing, computer vision, and audio analysis.

Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.

Submit a request

API Schema

Generate a conversational response using a language model.

post

Creates a chat completion using a language model, allowing interactive conversation by predicting the next response based on the given chat history. This is useful for AI-driven dialogue systems and virtual assistants.

Authorizations
Body
modelundefined · enumrequired
Options: gemini-pro
frequency_penaltynumber | nullableoptional
logit_biasobject | nullableoptional

max_tokensnumber · min: 1 · default: 512optional
presence_penaltynumber | nullableoptional
messagesone of[]required

streamboolean · default: falseoptional
top_pnumber · min: 0.1 · max: 1optional
temperaturenumber · max: 2optional
stopany ofoptional

toolsobject[]optional

tool_choiceany ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.aimlapi.com/v1/chat/completions' \
  --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-pro",
    "frequency_penalty": 1,
    "logit_bias": {
      "ANY_ADDITIONAL_PROPERTY": 1
    },
    "max_tokens": 1,
    "presence_penalty": 1,
    "messages": [
      {
        "role": "system",
        "content": "text",
        "name": "text"
      }
    ],
    "stream": true,
    "top_p": 1,
    "temperature": 1,
    "stop": "text",
    "tools": [
      {
        "type": "function",
        "function": {
          "description": "text",
          "name": "text",
          "parameters": {
            "ANY_ADDITIONAL_PROPERTY": null
          }
        }
      }
    ],
    "tool_choice": "none"
  }'

No body

Last updated

Was this helpful?