POST
/
v1
/
gemini
/
chat
/
completions
curl --location 'https://api.altrum.ai/v1/gemini/chat/completions' --header 'Authorization: GEMINI_API_KEY' --header 'Project-Api-Key: ALTRUMAI_PROJECT_API_KEY' --header 'Content-Type: application/json' --data '{
    "model":"gemini-1.5-pro",
    "messages": [
        {"role":"assistant", "content":"You are a helpful assistant"},
        {"role":"user", "content":"Hello"}
    ],
    "stream":false
}'
{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "Hello there! How can I help you today?\n",
        "role": "assistant"
      }
    }
  ],
  "created": 1742367840,
  "id": "chatcmpl-74f72541-3fd2-4be2-ba2a-64ba93f39dc0",
  "model": "gemini-1.5-pro",
  "object": "chat.completion",
  "usage": {
    "completion_tokens": 11,
    "prompt_tokens": 6,
    "total_tokens": 17
  },
  "vertex_ai_citation_metadata": [],
  "vertex_ai_grounding_metadata": [],
  "vertex_ai_safety_results": []
}

Note: Only Chat Completion LLMs are compatible with this proxy.

Authorizations

Project-Api-Key
string
header
required

Headers

authorization
string
required

Google Gemini API key

Body

application/json

Schema for Google Gemini API requests.

Response

200
application/json

Successful Response

Schema for LLM model responses.