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

# gemini-3.5-flash-lite

> Generate a response with Gemini 3.5 Flash-Lite. The final non-empty conversation turn must use the user role.



## OpenAPI

````yaml api-reference/model-api/google/openapi/gemini-3.5-flash-lite/openapi.yaml POST /v1beta/models/gemini-3.5-flash-lite:generateContent
openapi: 3.1.0
info:
  title: Gemini 3.5 Flash-Lite
  description: >-
    Generate text and structured data from text and multimodal inputs through
    the native Gemini API. Sampling parameters temperature, topP, and topK are
    deprecated for this model.
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security: []
paths:
  /v1beta/models/gemini-3.5-flash-lite:generateContent:
    post:
      summary: Generate content
      description: >-
        Generate a response with Gemini 3.5 Flash-Lite. The final non-empty
        conversation turn must use the user role.
      operationId: gemini35FlashLiteGenerateContent
      parameters:
        - name: key
          in: query
          required: true
          description: AnyFast API key.
          schema:
            type: string
          example: YOUR_API_KEY
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - contents
              properties:
                contents:
                  type: array
                  minItems: 1
                  description: >-
                    Conversation turns. Do not end the request with a non-empty
                    model turn.
                  items:
                    $ref: '#/components/schemas/Content'
                systemInstruction:
                  $ref: '#/components/schemas/SystemInstruction'
                generationConfig:
                  $ref: '#/components/schemas/GenerationConfig'
                tools:
                  type: array
                  description: >-
                    Function declarations or supported built-in Gemini tools
                    such as Google Search and code execution.
                  items:
                    $ref: '#/components/schemas/Tool'
                toolConfig:
                  type: object
                  additionalProperties: true
                  description: Tool execution and function-calling configuration.
                safetySettings:
                  type: array
                  description: Per-category content safety thresholds.
                  items:
                    $ref: '#/components/schemas/SafetySetting'
              example:
                contents:
                  - role: user
                    parts:
                      - text: Extract the invoice number, date, and total as JSON.
                generationConfig:
                  thinkingConfig:
                    thinkingLevel: minimal
                  responseMimeType: application/json
                  maxOutputTokens: 1024
      responses:
        '200':
          description: Content generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
        '400':
          description: >-
            Invalid request, including a request ending with a non-empty model
            turn
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
components:
  schemas:
    Content:
      type: object
      required:
        - parts
      properties:
        role:
          type: string
          enum:
            - user
            - model
          default: user
        parts:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Part'
    SystemInstruction:
      type: object
      properties:
        parts:
          type: array
          items:
            $ref: '#/components/schemas/Part'
    GenerationConfig:
      type: object
      description: >-
        Do not include temperature, topP, topK, candidateCount, or
        thinkingBudget.
      properties:
        thinkingConfig:
          type: object
          properties:
            thinkingLevel:
              type: string
              enum:
                - minimal
                - medium
                - high
              default: minimal
              description: >-
                Use minimal for maximum throughput, or medium/high for
                multi-step tool use.
        maxOutputTokens:
          type: integer
          minimum: 1
          maximum: 65536
        responseMimeType:
          type: string
          example: application/json
        responseSchema:
          type: object
          additionalProperties: true
          description: JSON Schema for structured output.
        stopSequences:
          type: array
          items:
            type: string
    Tool:
      type: object
      properties:
        functionDeclarations:
          type: array
          items:
            type: object
            required:
              - name
              - description
              - parameters
            properties:
              name:
                type: string
              description:
                type: string
              parameters:
                type: object
                additionalProperties: true
                description: JSON Schema for function arguments.
        googleSearch:
          type: object
          additionalProperties: true
        codeExecution:
          type: object
          additionalProperties: true
        urlContext:
          type: object
          additionalProperties: true
    SafetySetting:
      type: object
      required:
        - category
        - threshold
      properties:
        category:
          type: string
        threshold:
          type: string
    GenerateContentResponse:
      type: object
      properties:
        candidates:
          type: array
          items:
            type: object
            properties:
              content:
                $ref: '#/components/schemas/Content'
              finishReason:
                type: string
                example: STOP
              index:
                type: integer
                example: 0
              safetyRatings:
                type: array
                nullable: true
                items:
                  type: object
                  additionalProperties: true
        usageMetadata:
          type: object
          properties:
            promptTokenCount:
              type: integer
            candidatesTokenCount:
              type: integer
            cachedContentTokenCount:
              type: integer
            thoughtsTokenCount:
              type: integer
            toolUsePromptTokenCount:
              type: integer
            totalTokenCount:
              type: integer
            serviceTier:
              type: string
              example: standard
            promptTokensDetails:
              type: array
              items:
                $ref: '#/components/schemas/ModalityTokenCount'
            toolUsePromptTokensDetails:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/ModalityTokenCount'
        modelVersion:
          type: string
          example: gemini-3.5-flash-lite
        responseId:
          type: string
        quota:
          type: integer
          description: AnyFast quota usage reported for the request.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
    Part:
      type: object
      description: A text, media, function-call, or function-response part.
      properties:
        text:
          type: string
        thought:
          type: boolean
          description: Whether this part contains model reasoning.
        thoughtSignature:
          type: string
          description: >-
            Opaque signature that must be preserved in multi-turn tool
            workflows.
        inlineData:
          type: object
          required:
            - mimeType
            - data
          properties:
            mimeType:
              type: string
              example: image/jpeg
            data:
              type: string
              description: Base64-encoded image
              audio: null
              video: null
              or document data.: null
        fileData:
          type: object
          required:
            - mimeType
            - fileUri
          properties:
            mimeType:
              type: string
              example: application/pdf
            fileUri:
              type: string
              format: uri
              description: Gemini Files URI or supported public media URL.
        functionCall:
          type: object
          properties:
            name:
              type: string
            args:
              type: object
              additionalProperties: true
        functionResponse:
          type: object
          properties:
            name:
              type: string
            id:
              type: string
              description: Call ID returned by the model.
            response:
              type: object
              additionalProperties: true
        executableCode:
          type: object
          properties:
            language:
              type: string
              example: PYTHON
            code:
              type: string
        codeExecutionResult:
          type: object
          properties:
            outcome:
              type: string
              example: OUTCOME_OK
            output:
              type: string
    ModalityTokenCount:
      type: object
      properties:
        modality:
          type: string
          example: TEXT
        tokenCount:
          type: integer

````