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

# Gemini stream generate content (v1beta)

> Google-style streaming endpoint that takes model from the path.



## OpenAPI

````yaml openapi.yaml post /v1beta/models/{model}:streamGenerateContent
openapi: 3.0.3
info:
  description: OpenAPI documentation for Fiber applications
  title: NordlysProxy Inference API
  version: 1.0.0
servers: []
security: []
paths:
  /v1beta/models/{model}:streamGenerateContent:
    post:
      summary: Gemini stream generate content (v1beta)
      description: Google-style streaming endpoint that takes model from the path.
      parameters:
        - in: path
          name: model
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateGeminiGenerateContentRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: OK
      security:
        - apiKey: []
components:
  schemas:
    GenerateGeminiGenerateContentRequest:
      properties:
        contents:
          example:
            - parts:
                - text: Explain nordlys routing.
              role: user
          items:
            $ref: '#/components/schemas/GenaiContent'
          nullable: true
          type: array
        generation_config:
          $ref: '#/components/schemas/GenaiGenerateContentConfig'
        model:
          example: gemini-3-pro-preview
          type: string
        models:
          items:
            type: string
          nullable: true
          type: array
        provider_configs:
          additionalProperties:
            $ref: '#/components/schemas/RegistryProviderConfigOverride'
          nullable: true
          type: object
        provider_data_collection:
          type: string
        provider_enforce_distillable_text:
          nullable: true
          type: boolean
        provider_ignore:
          items:
            type: string
          nullable: true
          type: array
        provider_max_completion_price:
          nullable: true
          type: number
        provider_max_image_price:
          nullable: true
          type: number
        provider_max_prompt_price:
          nullable: true
          type: number
        provider_max_request_price:
          nullable: true
          type: number
        provider_only:
          items:
            type: string
          nullable: true
          type: array
        provider_order:
          items:
            type: string
          nullable: true
          type: array
        provider_quantizations:
          items:
            type: string
          nullable: true
          type: array
        provider_require_parameters:
          type: boolean
        provider_sort:
          type: string
        provider_zdr:
          nullable: true
          type: boolean
        safety_settings:
          items:
            $ref: '#/components/schemas/GenaiSafetySetting'
          nullable: true
          type: array
        system_instruction:
          $ref: '#/components/schemas/GenaiContent'
        tool_config:
          $ref: '#/components/schemas/GenaiToolConfig'
        tools:
          items:
            $ref: '#/components/schemas/GenaiTool'
          nullable: true
          type: array
      type: object
    GenaiContent:
      properties:
        parts:
          items:
            $ref: '#/components/schemas/GenaiPart'
          type: array
        role:
          type: string
      type: object
    GenaiGenerateContentConfig:
      properties:
        audioTimestamp:
          type: boolean
        cachedContent:
          type: string
        candidateCount:
          format: int32
          type: integer
        enableEnhancedCivicAnswers:
          nullable: true
          type: boolean
        frequencyPenalty:
          nullable: true
          type: number
        httpOptions:
          $ref: '#/components/schemas/GenaiHTTPOptions'
        imageConfig:
          $ref: '#/components/schemas/GenaiImageConfig'
        labels:
          additionalProperties:
            type: string
          type: object
        logprobs:
          nullable: true
          type: integer
        maxOutputTokens:
          format: int32
          type: integer
        mediaResolution:
          type: string
        modelSelectionConfig:
          $ref: '#/components/schemas/GenaiModelSelectionConfig'
        presencePenalty:
          nullable: true
          type: number
        responseJsonSchema: {}
        responseLogprobs:
          type: boolean
        responseMimeType:
          type: string
        responseModalities:
          items:
            type: string
          type: array
        responseSchema:
          $ref: '#/components/schemas/GenaiSchema'
        routingConfig:
          $ref: '#/components/schemas/GenaiGenerationConfigRoutingConfig'
        safetySettings:
          items:
            $ref: '#/components/schemas/GenaiSafetySetting'
          type: array
        seed:
          nullable: true
          type: integer
        speechConfig:
          $ref: '#/components/schemas/GenaiSpeechConfig'
        stopSequences:
          items:
            type: string
          type: array
        systemInstruction:
          $ref: '#/components/schemas/GenaiContent'
        temperature:
          nullable: true
          type: number
        thinkingConfig:
          $ref: '#/components/schemas/GenaiThinkingConfig'
        toolConfig:
          $ref: '#/components/schemas/GenaiToolConfig'
        tools:
          items:
            $ref: '#/components/schemas/GenaiTool'
          type: array
        topK:
          nullable: true
          type: number
        topP:
          nullable: true
          type: number
      type: object
    RegistryProviderConfigOverride:
      properties:
        api_key:
          nullable: true
          type: string
        base_url:
          nullable: true
          type: string
        endpoint_overrides:
          additionalProperties:
            $ref: '#/components/schemas/RegistryEndpointOverride'
          type: object
      type: object
    GenaiSafetySetting:
      properties:
        category:
          type: string
        method:
          type: string
        threshold:
          type: string
      type: object
    GenaiToolConfig:
      properties:
        functionCallingConfig:
          $ref: '#/components/schemas/GenaiFunctionCallingConfig'
        retrievalConfig:
          $ref: '#/components/schemas/GenaiRetrievalConfig'
      type: object
    GenaiTool:
      properties:
        codeExecution:
          $ref: '#/components/schemas/GenaiToolCodeExecution'
        computerUse:
          $ref: '#/components/schemas/GenaiComputerUse'
        enterpriseWebSearch:
          $ref: '#/components/schemas/GenaiEnterpriseWebSearch'
        fileSearch:
          $ref: '#/components/schemas/GenaiFileSearch'
        functionDeclarations:
          items:
            $ref: '#/components/schemas/GenaiFunctionDeclaration'
          type: array
        googleMaps:
          $ref: '#/components/schemas/GenaiGoogleMaps'
        googleSearch:
          $ref: '#/components/schemas/GenaiGoogleSearch'
        googleSearchRetrieval:
          $ref: '#/components/schemas/GenaiGoogleSearchRetrieval'
        retrieval:
          $ref: '#/components/schemas/GenaiRetrieval'
        urlContext:
          $ref: '#/components/schemas/GenaiURLContext'
      type: object
    GenaiPart:
      properties:
        codeExecutionResult:
          $ref: '#/components/schemas/GenaiCodeExecutionResult'
        executableCode:
          $ref: '#/components/schemas/GenaiExecutableCode'
        fileData:
          $ref: '#/components/schemas/GenaiFileData'
        functionCall:
          $ref: '#/components/schemas/GenaiFunctionCall'
        functionResponse:
          $ref: '#/components/schemas/GenaiFunctionResponse'
        inlineData:
          $ref: '#/components/schemas/GenaiBlob'
        mediaResolution:
          $ref: '#/components/schemas/GenaiPartMediaResolution'
        text:
          type: string
        thought:
          type: boolean
        thoughtSignature:
          format: base64
          type: string
        videoMetadata:
          $ref: '#/components/schemas/GenaiVideoMetadata'
      type: object
    GenaiHTTPOptions:
      properties:
        apiVersion:
          type: string
        baseUrl:
          type: string
        extraBody:
          additionalProperties: {}
          type: object
        headers:
          $ref: '#/components/schemas/HttpHeader'
        timeout:
          $ref: '#/components/schemas/TimeDuration'
      type: object
    GenaiImageConfig:
      properties:
        aspectRatio:
          type: string
        imageSize:
          type: string
        outputCompressionQuality:
          nullable: true
          type: integer
        outputMimeType:
          type: string
      type: object
    GenaiModelSelectionConfig:
      properties:
        featureSelectionPreference:
          type: string
      type: object
    GenaiSchema:
      properties:
        anyOf:
          items:
            $ref: '#/components/schemas/GenaiSchema'
          type: array
        default: {}
        description:
          type: string
        enum:
          items:
            type: string
          type: array
        example: {}
        format:
          type: string
        items:
          $ref: '#/components/schemas/GenaiSchema'
        maxItems:
          nullable: true
          type: integer
        maxLength:
          nullable: true
          type: integer
        maxProperties:
          nullable: true
          type: integer
        maximum:
          nullable: true
          type: number
        minItems:
          nullable: true
          type: integer
        minLength:
          nullable: true
          type: integer
        minProperties:
          nullable: true
          type: integer
        minimum:
          nullable: true
          type: number
        nullable:
          nullable: true
          type: boolean
        pattern:
          type: string
        properties:
          additionalProperties:
            $ref: '#/components/schemas/GenaiSchema'
          type: object
        propertyOrdering:
          items:
            type: string
          type: array
        required:
          items:
            type: string
          type: array
        title:
          type: string
        type:
          type: string
      type: object
    GenaiGenerationConfigRoutingConfig:
      properties:
        autoMode:
          $ref: >-
            #/components/schemas/GenaiGenerationConfigRoutingConfigAutoRoutingMode
        manualMode:
          $ref: >-
            #/components/schemas/GenaiGenerationConfigRoutingConfigManualRoutingMode
      type: object
    GenaiSpeechConfig:
      properties:
        languageCode:
          type: string
        multiSpeakerVoiceConfig:
          $ref: '#/components/schemas/GenaiMultiSpeakerVoiceConfig'
        voiceConfig:
          $ref: '#/components/schemas/GenaiVoiceConfig'
      type: object
    GenaiThinkingConfig:
      properties:
        includeThoughts:
          type: boolean
        thinkingBudget:
          nullable: true
          type: integer
        thinkingLevel:
          type: string
      type: object
    RegistryEndpointOverride:
      properties:
        base_url:
          type: string
        timeout:
          type: integer
      type: object
    GenaiFunctionCallingConfig:
      properties:
        allowedFunctionNames:
          items:
            type: string
          type: array
        mode:
          type: string
        streamFunctionCallArguments:
          nullable: true
          type: boolean
      type: object
    GenaiRetrievalConfig:
      properties:
        languageCode:
          type: string
        latLng:
          $ref: '#/components/schemas/GenaiLatLng'
      type: object
    GenaiToolCodeExecution:
      type: object
    GenaiComputerUse:
      properties:
        environment:
          type: string
        excludedPredefinedFunctions:
          items:
            type: string
          type: array
      type: object
    GenaiEnterpriseWebSearch:
      properties:
        blockingConfidence:
          type: string
        excludeDomains:
          items:
            type: string
          type: array
      type: object
    GenaiFileSearch:
      properties:
        fileSearchStoreNames:
          items:
            type: string
          type: array
        metadataFilter:
          type: string
        topK:
          nullable: true
          type: integer
      type: object
    GenaiFunctionDeclaration:
      properties:
        behavior:
          type: string
        description:
          type: string
        name:
          type: string
        parameters:
          $ref: '#/components/schemas/GenaiSchema'
        parametersJsonSchema: {}
        response:
          $ref: '#/components/schemas/GenaiSchema'
        responseJsonSchema: {}
      type: object
    GenaiGoogleMaps:
      properties:
        authConfig:
          $ref: '#/components/schemas/GenaiAuthConfig'
        enableWidget:
          nullable: true
          type: boolean
      type: object
    GenaiGoogleSearch:
      properties:
        blockingConfidence:
          type: string
        excludeDomains:
          items:
            type: string
          type: array
        timeRangeFilter:
          $ref: '#/components/schemas/GenaiInterval'
      type: object
    GenaiGoogleSearchRetrieval:
      properties:
        dynamicRetrievalConfig:
          $ref: '#/components/schemas/GenaiDynamicRetrievalConfig'
      type: object
    GenaiRetrieval:
      properties:
        disableAttribution:
          type: boolean
        externalApi:
          $ref: '#/components/schemas/GenaiExternalAPI'
        vertexAiSearch:
          $ref: '#/components/schemas/GenaiVertexAISearch'
        vertexRagStore:
          $ref: '#/components/schemas/GenaiVertexRAGStore'
      type: object
    GenaiURLContext:
      type: object
    GenaiCodeExecutionResult:
      properties:
        outcome:
          type: string
        output:
          type: string
      type: object
    GenaiExecutableCode:
      properties:
        code:
          type: string
        language:
          type: string
      type: object
    GenaiFileData:
      properties:
        displayName:
          type: string
        fileUri:
          type: string
        mimeType:
          type: string
      type: object
    GenaiFunctionCall:
      properties:
        args:
          additionalProperties: {}
          type: object
        id:
          type: string
        name:
          type: string
        partialArgs:
          items:
            $ref: '#/components/schemas/GenaiPartialArg'
          type: array
        willContinue:
          nullable: true
          type: boolean
      type: object
    GenaiFunctionResponse:
      properties:
        id:
          type: string
        name:
          type: string
        parts:
          items:
            $ref: '#/components/schemas/GenaiFunctionResponsePart'
          type: array
        response:
          additionalProperties: {}
          type: object
        scheduling:
          type: string
        willContinue:
          nullable: true
          type: boolean
      type: object
    GenaiBlob:
      properties:
        data:
          format: base64
          type: string
        displayName:
          type: string
        mimeType:
          type: string
      type: object
    GenaiPartMediaResolution:
      properties:
        level:
          type: string
        numTokens:
          nullable: true
          type: integer
      type: object
    GenaiVideoMetadata:
      properties:
        endOffset:
          $ref: '#/components/schemas/TimeDuration'
        fps:
          nullable: true
          type: number
        startOffset:
          $ref: '#/components/schemas/TimeDuration'
      type: object
    HttpHeader:
      additionalProperties:
        items:
          type: string
        type: array
      type: object
    TimeDuration:
      format: int64
      type: integer
    GenaiGenerationConfigRoutingConfigAutoRoutingMode:
      properties:
        modelRoutingPreference:
          type: string
      type: object
    GenaiGenerationConfigRoutingConfigManualRoutingMode:
      properties:
        modelName:
          type: string
      type: object
    GenaiMultiSpeakerVoiceConfig:
      properties:
        speakerVoiceConfigs:
          items:
            $ref: '#/components/schemas/GenaiSpeakerVoiceConfig'
          type: array
      type: object
    GenaiVoiceConfig:
      properties:
        prebuiltVoiceConfig:
          $ref: '#/components/schemas/GenaiPrebuiltVoiceConfig'
        replicatedVoiceConfig:
          $ref: '#/components/schemas/GenaiReplicatedVoiceConfig'
      type: object
    GenaiLatLng:
      properties:
        latitude:
          nullable: true
          type: number
        longitude:
          nullable: true
          type: number
      type: object
    GenaiAuthConfig:
      properties:
        apiKeyConfig:
          $ref: '#/components/schemas/GenaiAPIKeyConfig'
        authType:
          type: string
        googleServiceAccountConfig:
          $ref: '#/components/schemas/GenaiAuthConfigGoogleServiceAccountConfig'
        httpBasicAuthConfig:
          $ref: '#/components/schemas/GenaiAuthConfigHTTPBasicAuthConfig'
        oauthConfig:
          $ref: '#/components/schemas/GenaiAuthConfigOauthConfig'
        oidcConfig:
          $ref: '#/components/schemas/GenaiAuthConfigOidcConfig'
      type: object
    GenaiInterval:
      properties:
        endTime:
          format: date-time
          type: string
        startTime:
          format: date-time
          type: string
      type: object
    GenaiDynamicRetrievalConfig:
      properties:
        dynamicThreshold:
          nullable: true
          type: number
        mode:
          type: string
      type: object
    GenaiExternalAPI:
      properties:
        apiAuth:
          $ref: '#/components/schemas/GenaiAPIAuth'
        apiSpec:
          type: string
        authConfig:
          $ref: '#/components/schemas/GenaiAuthConfig'
        elasticSearchParams:
          $ref: '#/components/schemas/GenaiExternalAPIElasticSearchParams'
        endpoint:
          type: string
        simpleSearchParams:
          $ref: '#/components/schemas/GenaiExternalAPISimpleSearchParams'
      type: object
    GenaiVertexAISearch:
      properties:
        dataStoreSpecs:
          items:
            $ref: '#/components/schemas/GenaiVertexAISearchDataStoreSpec'
          type: array
        datastore:
          type: string
        engine:
          type: string
        filter:
          type: string
        maxResults:
          nullable: true
          type: integer
      type: object
    GenaiVertexRAGStore:
      properties:
        ragCorpora:
          items:
            type: string
          type: array
        ragResources:
          items:
            $ref: '#/components/schemas/GenaiVertexRAGStoreRAGResource'
          type: array
        ragRetrievalConfig:
          $ref: '#/components/schemas/GenaiRAGRetrievalConfig'
        similarityTopK:
          nullable: true
          type: integer
        storeContext:
          nullable: true
          type: boolean
        vectorDistanceThreshold:
          nullable: true
          type: number
      type: object
    GenaiPartialArg:
      properties:
        boolValue:
          nullable: true
          type: boolean
        jsonPath:
          type: string
        nullValue:
          type: string
        numberValue:
          nullable: true
          type: number
        stringValue:
          type: string
        willContinue:
          nullable: true
          type: boolean
      type: object
    GenaiFunctionResponsePart:
      properties:
        fileData:
          $ref: '#/components/schemas/GenaiFunctionResponseFileData'
        inlineData:
          $ref: '#/components/schemas/GenaiFunctionResponseBlob'
      type: object
    GenaiSpeakerVoiceConfig:
      properties:
        speaker:
          type: string
        voiceConfig:
          $ref: '#/components/schemas/GenaiVoiceConfig'
      type: object
    GenaiPrebuiltVoiceConfig:
      properties:
        voiceName:
          type: string
      type: object
    GenaiReplicatedVoiceConfig:
      properties:
        mimeType:
          type: string
        voiceSampleAudio:
          format: base64
          type: string
      type: object
    GenaiAPIKeyConfig:
      properties:
        apiKeySecret:
          type: string
        apiKeyString:
          type: string
        httpElementLocation:
          type: string
        name:
          type: string
      type: object
    GenaiAuthConfigGoogleServiceAccountConfig:
      properties:
        serviceAccount:
          type: string
      type: object
    GenaiAuthConfigHTTPBasicAuthConfig:
      properties:
        credentialSecret:
          type: string
      type: object
    GenaiAuthConfigOauthConfig:
      properties:
        accessToken:
          type: string
        serviceAccount:
          type: string
      type: object
    GenaiAuthConfigOidcConfig:
      properties:
        idToken:
          type: string
        serviceAccount:
          type: string
      type: object
    GenaiAPIAuth:
      properties:
        apiKeyConfig:
          $ref: '#/components/schemas/GenaiAPIAuthAPIKeyConfig'
      type: object
    GenaiExternalAPIElasticSearchParams:
      properties:
        index:
          type: string
        numHits:
          nullable: true
          type: integer
        searchTemplate:
          type: string
      type: object
    GenaiExternalAPISimpleSearchParams:
      type: object
    GenaiVertexAISearchDataStoreSpec:
      properties:
        dataStore:
          type: string
        filter:
          type: string
      type: object
    GenaiVertexRAGStoreRAGResource:
      properties:
        ragCorpus:
          type: string
        ragFileIds:
          items:
            type: string
          type: array
      type: object
    GenaiRAGRetrievalConfig:
      properties:
        filter:
          $ref: '#/components/schemas/GenaiRAGRetrievalConfigFilter'
        hybridSearch:
          $ref: '#/components/schemas/GenaiRAGRetrievalConfigHybridSearch'
        ranking:
          $ref: '#/components/schemas/GenaiRAGRetrievalConfigRanking'
        topK:
          nullable: true
          type: integer
      type: object
    GenaiFunctionResponseFileData:
      properties:
        displayName:
          type: string
        fileUri:
          type: string
        mimeType:
          type: string
      type: object
    GenaiFunctionResponseBlob:
      properties:
        data:
          format: base64
          type: string
        displayName:
          type: string
        mimeType:
          type: string
      type: object
    GenaiAPIAuthAPIKeyConfig:
      properties:
        apiKeySecretVersion:
          type: string
        apiKeyString:
          type: string
      type: object
    GenaiRAGRetrievalConfigFilter:
      properties:
        metadataFilter:
          type: string
        vectorDistanceThreshold:
          nullable: true
          type: number
        vectorSimilarityThreshold:
          nullable: true
          type: number
      type: object
    GenaiRAGRetrievalConfigHybridSearch:
      properties:
        alpha:
          nullable: true
          type: number
      type: object
    GenaiRAGRetrievalConfigRanking:
      properties:
        llmRanker:
          $ref: '#/components/schemas/GenaiRAGRetrievalConfigRankingLlmRanker'
        rankService:
          $ref: '#/components/schemas/GenaiRAGRetrievalConfigRankingRankService'
      type: object
    GenaiRAGRetrievalConfigRankingLlmRanker:
      properties:
        modelName:
          type: string
      type: object
    GenaiRAGRetrievalConfigRankingRankService:
      properties:
        modelName:
          type: string
      type: object
  securitySchemes:
    apiKey:
      in: header
      name: X-API-Key
      type: apiKey

````