---
title: "AIGatewayTargetModelConfig"
url: "https://nov18-dev.movespot.fyi/apis/konnect-ai-gateway-dev-0/versions/eaabd2fa-a9d5-44cc-b086-e210c9c21bf3/schemas/AIGatewayTargetModelConfig"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-ai-gateway-dev-0/versions/eaabd2fa-a9d5-44cc-b086-e210c9c21bf3.md

# AIGatewayTargetModelConfig

Configuration for a target model.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect AI Gateway
  version: 0.0.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
components:
  schemas:
    AIGatewayTargetModelAnthropicConfig:
      description: Anthropic-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - anthropic
        version:
          description: The Anthropic API version to use.
          type: string
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelAzureConfig:
      description: Azure-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - azure
        deployment_id:
          description: The Azure deployment ID for the model.
          type: string
        api_version:
          description: The Azure OpenAI API version to use.
          type: string
          default: 2023-05-15
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelBedrockConfig:
      description: AWS Bedrock-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - bedrock
        batch_bucket_prefix:
          description: S3 bucket prefix for batch inference jobs.
          type: string
        embeddings_normalize:
          description: Whether to normalize embedding vectors in the response.
          type: boolean
          default: false
        performance_config_latency:
          description: Latency performance configuration for the model invocation.
          type: string
        video_output_s3_uri:
          description: S3 URI for storing video generation outputs.
          type: string
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelCohereConfig:
      description: Cohere-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - cohere
        embedding_input_type:
          description: The intended downstream use of the embeddings to improve model
            quality.
          type: string
          default: classification
          enum:
            - classification
            - clustering
            - image
            - search_document
            - search_query
        wait_for_model:
          description: Whether to wait for the model to be ready before sending the request.
          type: boolean
          default: false
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelDashscopeConfig:
      description: Alibaba DashScope-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - dashscope
        international:
          description: Whether to use the international DashScope endpoint.
          type: boolean
          default: true
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelDatabricksConfig:
      description: Databricks-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - databricks
        workspace_instance_id:
          description: The Databricks workspace instance ID.
          type: string
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelGeminiConfig:
      description: Google Gemini-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - gemini
        location_id:
          description: The Google Cloud location ID for the model endpoint.
          type: string
        api_endpoint:
          description: The custom API endpoint for the Gemini model.
          type: string
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelHuggingfaceConfig:
      description: Hugging Face-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - huggingface
        use_cache:
          description: Whether to use the Hugging Face inference cache.
          type: boolean
          default: false
        wait_for_model:
          description: Whether to wait for the model to load if it is not ready.
          type: boolean
          default: false
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelLlama2Config:
      description: Llama2-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - llama2
        format:
          description: The request format to use when communicating with the Llama2 model.
          type: string
          enum:
            - ollama
            - openai
            - raw
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelMistralConfig:
      description: Mistral-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - mistral
        format:
          description: The request format to use when communicating with the Mistral model.
          type: string
          enum:
            - ollama
            - openai
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelConfig:
      description: Configuration for a target model.
      discriminator:
        propertyName: type
        mapping:
          anthropic: "#/components/schemas/AIGatewayTargetModelAnthropicConfig"
          azure: "#/components/schemas/AIGatewayTargetModelAzureConfig"
          bedrock: "#/components/schemas/AIGatewayTargetModelBedrockConfig"
          cohere: "#/components/schemas/AIGatewayTargetModelCohereConfig"
          dashscope: "#/components/schemas/AIGatewayTargetModelDashscopeConfig"
          databricks: "#/components/schemas/AIGatewayTargetModelDatabricksConfig"
          gemini: "#/components/schemas/AIGatewayTargetModelGeminiConfig"
          huggingface: "#/components/schemas/AIGatewayTargetModelHuggingfaceConfig"
          llama2: "#/components/schemas/AIGatewayTargetModelLlama2Config"
          mistral: "#/components/schemas/AIGatewayTargetModelMistralConfig"
      oneOf:
        - $ref: "#/components/schemas/AIGatewayTargetModelAnthropicConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelAzureConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelBedrockConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelCohereConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelDashscopeConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelDatabricksConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelGeminiConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelHuggingfaceConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelLlama2Config"
        - $ref: "#/components/schemas/AIGatewayTargetModelMistralConfig"
```
