> ## Documentation Index
> Fetch the complete documentation index at: https://nusabase-a8dcf793.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini API (/v1)

> Gemini native API (accessed via the /v1 prefix). The path after /v1/models/ is passed through directly (e.g. gemini-2.0-flash:generateContent).



## OpenAPI

````yaml /en/openapi/relay-api.mintlify.json post /v1/models/{model}
openapi: 3.0.1
info:
  title: AI Relay API
  description: >-
    Unified AI Model API supporting OpenAI, Claude, Gemini, Kling, Jimeng and
    other formats
  version: 1.0.0
  license:
    name: Proprietary
    url: https://example.com/license
servers:
  - url: https://api.nusabasedigital.com
    description: API Base URL
security:
  - BearerAuth: []
tags:
  - name: Models
    description: Models endpoints
  - name: Chat
    description: Chat endpoints
  - name: Responses
    description: Responses endpoints
  - name: Realtime
    description: Realtime endpoints
  - name: Claude
    description: Claude endpoints
  - name: Gemini
    description: Gemini endpoints
  - name: Images
    description: Images endpoints
  - name: Video
    description: Video endpoints
  - name: Video / Kling
    description: Video / Kling endpoints
  - name: Video / Jimeng
    description: Video / Jimeng endpoints
  - name: Audio
    description: Audio endpoints
  - name: Embeddings
    description: Embeddings endpoints
  - name: Rerank
    description: Rerank endpoints
  - name: Moderations
    description: Moderations endpoints
  - name: Not Implemented
    description: Not Implemented endpoints
paths:
  /v1/models/{model}:
    post:
      tags:
        - Gemini
      summary: Gemini API (/v1)
      description: >-
        Gemini native API (accessed via the /v1 prefix). The path after
        /v1/models/ is passed through directly (e.g.
        gemini-2.0-flash:generateContent).
      operationId: post_v1_models_model
      parameters:
        - name: model
          in: path
          description: Model Model name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeminiRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeminiResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    GeminiRequest:
      type: object
      properties:
        contents:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                  - user
                  - model
              parts:
                type: array
                items:
                  type: object
                  properties:
                    text:
                      type: string
                    inlineData:
                      type: object
                      properties:
                        mimeType:
                          type: string
                        data:
                          type: string
        generationConfig:
          type: object
          properties:
            temperature:
              type: number
            topP:
              type: number
            topK:
              type: integer
            maxOutputTokens:
              type: integer
            stopSequences:
              type: array
              items:
                type: string
        safetySettings:
          type: array
          items:
            type: object
            properties:
              category:
                type: string
              threshold:
                type: string
        tools:
          type: array
          items:
            type: object
            properties: {}
        systemInstruction:
          type: object
          properties:
            parts:
              type: array
              items:
                type: object
                properties: {}
    GeminiResponse:
      type: object
      properties:
        candidates:
          type: array
          items:
            type: object
            properties:
              content:
                type: object
                properties:
                  role:
                    type: string
                  parts:
                    type: array
                    items:
                      type: object
                      properties: {}
              finishReason:
                type: string
              safetyRatings:
                type: array
                items:
                  type: object
                  properties: {}
        usageMetadata:
          type: object
          properties:
            promptTokenCount:
              type: integer
            candidatesTokenCount:
              type: integer
            totalTokenCount:
              type: integer
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error profile
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Related parameter
              nullable: true
            code:
              type: string
              description: Error code
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.