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

# Get a route connection

> Returns one team's connection to an upstream provider.

> [!NOTE]
>
> This endpoint is in beta. The request and response structure may change before it's generally available.


## OpenAPI

````yaml get /v1/grid/connections/{connection_id}
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/grid/connections/{connection_id}:
    parameters:
      - $ref: '#/components/parameters/connection_id'
    get:
      summary: Gets a connection
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridConnectionV1'
      x-codeSamples:
        - lang: bash
          source: |
            curl --request GET \
            --url https://api.baseten.co/v1/grid/connections/{connection_id} \
            --header "Authorization: Bearer $BASETEN_API_KEY"
        - lang: python
          source: |-
            import requests
            import os
            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
            url = "https://api.baseten.co/v1/grid/connections/{connection_id}"

            headers = {"Authorization": f"Bearer {API_KEY}"}

            response = requests.request(
                "GET",
                url,
                headers=headers,
                json={}
            )

            print(response.text)
components:
  parameters:
    connection_id:
      schema:
        type: string
      name: connection_id
      in: path
      required: true
  schemas:
    GridConnectionV1:
      properties:
        id:
          description: Stable connection identifier.
          title: Id
          type: string
        team_id:
          description: Identifier of the team that owns the connection.
          title: Team Id
          type: string
        team_name:
          description: Name of the team that owns the connection.
          title: Team Name
          type: string
        config:
          description: >-
            Provider the connection authenticates with, and the team secret
            holding its API key.
          discriminator:
            mapping:
              ANTHROPIC: '#/components/schemas/GridConnectionConfigAnthropicV1'
              AZURE: '#/components/schemas/GridConnectionConfigAzureV1'
              BEDROCK: '#/components/schemas/GridConnectionConfigBedrockV1'
              OPENAI: '#/components/schemas/GridConnectionConfigOpenAIV1'
              VERTEX: '#/components/schemas/GridConnectionConfigVertexV1'
              XAI: '#/components/schemas/GridConnectionConfigXAIV1'
            propertyName: provider
          oneOf:
            - $ref: '#/components/schemas/GridConnectionConfigAnthropicV1'
            - $ref: '#/components/schemas/GridConnectionConfigOpenAIV1'
            - $ref: '#/components/schemas/GridConnectionConfigXAIV1'
            - $ref: '#/components/schemas/GridConnectionConfigVertexV1'
            - $ref: '#/components/schemas/GridConnectionConfigBedrockV1'
            - $ref: '#/components/schemas/GridConnectionConfigAzureV1'
          title: Config
        created_at:
          description: Creation time, ISO 8601.
          format: date-time
          title: Created At
          type: string
        updated_at:
          description: Last update time, ISO 8601.
          format: date-time
          title: Updated At
          type: string
      required:
        - id
        - team_id
        - team_name
        - config
        - created_at
        - updated_at
      title: GridConnectionV1
      type: object
    GridConnectionConfigAnthropicV1:
      properties:
        provider:
          const: ANTHROPIC
          description: Provider kind for Anthropic.
          title: Provider
          type: string
        secret_id:
          description: Identifier of the team secret holding the provider API key.
          title: Secret Id
          type: string
        secret_name:
          description: Name of the team secret holding the provider API key.
          title: Secret Name
          type: string
      required:
        - provider
        - secret_id
        - secret_name
      title: GridConnectionConfigAnthropicV1
      type: object
    GridConnectionConfigAzureV1:
      properties:
        provider:
          const: AZURE
          description: Provider kind for Microsoft Azure.
          title: Provider
          type: string
        secret_id:
          description: Identifier of the team secret holding the provider API key.
          title: Secret Id
          type: string
        secret_name:
          description: Name of the team secret holding the provider API key.
          title: Secret Name
          type: string
        resource_name:
          description: Name of the Azure AI Foundry or Azure OpenAI resource.
          title: Resource Name
          type: string
      required:
        - provider
        - secret_id
        - secret_name
        - resource_name
      title: GridConnectionConfigAzureV1
      type: object
    GridConnectionConfigBedrockV1:
      properties:
        provider:
          const: BEDROCK
          description: Provider kind for Amazon Bedrock.
          title: Provider
          type: string
        secret_id:
          description: Identifier of the team secret holding the provider API key.
          title: Secret Id
          type: string
        secret_name:
          description: Name of the team secret holding the provider API key.
          title: Secret Name
          type: string
        region:
          description: AWS Region of the Amazon Bedrock endpoint.
          title: Region
          type: string
        auth:
          description: How the connection's secret authenticates with Amazon Bedrock.
          discriminator:
            mapping:
              access_keys: '#/components/schemas/GridConnectionBedrockAccessKeysAuthV1'
              api_key: '#/components/schemas/GridConnectionBedrockApiKeyAuthV1'
            propertyName: method
          oneOf:
            - $ref: '#/components/schemas/GridConnectionBedrockApiKeyAuthV1'
            - $ref: '#/components/schemas/GridConnectionBedrockAccessKeysAuthV1'
          title: Auth
      required:
        - provider
        - secret_id
        - secret_name
        - region
        - auth
      title: GridConnectionConfigBedrockV1
      type: object
    GridConnectionConfigOpenAIV1:
      properties:
        provider:
          const: OPENAI
          description: Provider kind for OpenAI.
          title: Provider
          type: string
        secret_id:
          description: Identifier of the team secret holding the provider API key.
          title: Secret Id
          type: string
        secret_name:
          description: Name of the team secret holding the provider API key.
          title: Secret Name
          type: string
      required:
        - provider
        - secret_id
        - secret_name
      title: GridConnectionConfigOpenAIV1
      type: object
    GridConnectionConfigVertexV1:
      properties:
        provider:
          const: VERTEX
          description: Provider kind for Google Vertex.
          title: Provider
          type: string
        secret_id:
          description: Identifier of the team secret holding the provider API key.
          title: Secret Id
          type: string
        secret_name:
          description: Name of the team secret holding the provider API key.
          title: Secret Name
          type: string
        project_id:
          description: >-
            Google Cloud project ID or number of a project with Vertex AI
            enabled.
          title: Project Id
          type: string
        location:
          description: >-
            Google Cloud region that serves the Vertex AI models, for example
            `us-central1`.
          title: Location
          type: string
      required:
        - provider
        - secret_id
        - secret_name
        - project_id
        - location
      title: GridConnectionConfigVertexV1
      type: object
    GridConnectionConfigXAIV1:
      properties:
        provider:
          const: XAI
          description: Provider kind for xAI.
          title: Provider
          type: string
        secret_id:
          description: Identifier of the team secret holding the provider API key.
          title: Secret Id
          type: string
        secret_name:
          description: Name of the team secret holding the provider API key.
          title: Secret Name
          type: string
      required:
        - provider
        - secret_id
        - secret_name
      title: GridConnectionConfigXAIV1
      type: object
    GridConnectionBedrockAccessKeysAuthV1:
      properties:
        method:
          const: access_keys
          description: >-
            The secret holds the access keys of an IAM user, as the
            base64-encoded JSON object `{"AccessKeyId": "...",
            "SecretAccessKey": "..."}`
          title: Method
          type: string
      required:
        - method
      title: GridConnectionBedrockAccessKeysAuthV1
      type: object
    GridConnectionBedrockApiKeyAuthV1:
      properties:
        method:
          const: api_key
          description: The secret holds a long-term Amazon Bedrock API key.
          title: Method
          type: string
      required:
        - method
      title: GridConnectionBedrockApiKeyAuthV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````