> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verlon.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini-compatible content generation (drop-in)

> **Use when:** caller has an existing Google Gemini SDK generateContent flow and wants to route through Verlon with zero code changes via a baseUrl swap

Drop-in replacement for `POST https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent`. Accepts the upstream Gemini request body verbatim and returns the upstream Gemini response body verbatim. Authenticate with `x-goog-api-key` (or `?key=`) carrying a Verlon API key. Errors are returned in the Google envelope (`{ error: { code, message, status } }`) so the `@google/genai` error parser handles them transparently.



## OpenAPI

````yaml /api-reference/openapi.json post /v1beta/models/{model}:generateContent
openapi: 3.1.0
info:
  title: Verlon AI API
  version: 1.0.0
  description: >-
    Verlon AI is the managed AI infrastructure platform for developers building
    LLM-powered apps and agents. Beyond routing requests across providers,
    Verlon continuously evaluates response quality, runs experiments against
    live traffic, and automatically tunes gate configurations — so your platform
    doesn't just serve traffic, it learns from it.


    **Coding agents:** authentication, error semantics, gate concepts, and
    integration conventions are documented at https://verlon.ai/AGENTS.md — read
    that document first if you have not already. It is the canonical
    agent-facing contract; this specification is the canonical endpoint
    reference. Both are authoritative for their respective scopes.
  contact:
    name: Verlon AI
    url: https://verlon.ai
  license:
    name: Proprietary
servers:
  - url: https://api.verlon.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1beta/models/{model}:generateContent:
    post:
      tags:
        - Google Compat
      summary: Gemini-compatible content generation (drop-in)
      description: >-
        **Use when:** caller has an existing Google Gemini SDK generateContent
        flow and wants to route through Verlon with zero code changes via a
        baseUrl swap


        Drop-in replacement for `POST
        https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent`.
        Accepts the upstream Gemini request body verbatim and returns the
        upstream Gemini response body verbatim. Authenticate with
        `x-goog-api-key` (or `?key=`) carrying a Verlon API key. Errors are
        returned in the Google envelope (`{ error: { code, message, status } }`)
        so the `@google/genai` error parser handles them transparently.
      parameters:
        - name: model
          in: path
          required: true
          description: >-
            The model to generate with — a Gemini model id (`gemini-2.5-pro`), a
            Verlon gate id, or `<gate-id>/<task>` to pin a task on an agent
            gate.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Gemini-format `GenerateContentResponse`. Shape matches the
            underlying provider format selected by the gate.
        '400':
          description: Invalid request — malformed or missing fields
        '401':
          description: Missing or invalid credentials
        '404':
          description: Unknown gate, model, or unsupported method
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Verlon API key (newly minted keys are prefixed `sk-vrln-`; legacy
        `verlon_*` and `layer_*` keys from prior prefix migrations continue to
        validate). Generated from the dashboard under Settings → API Keys, or
        via `verlon key create` in the CLI.

````