> ## 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.

# List routes

> Lists routes you can invoke, newest first, optionally filtered by team and exact name.



## OpenAPI

````yaml get /v1/routes
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/routes:
    get:
      summary: Lists routes
      description: >-
        Lists routes you can invoke, newest first, optionally filtered by team
        and exact name.
      parameters:
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque cursor returned by a previous page. Omit to fetch the first
            page.
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            title: Cursor
        - name: limit
          in: query
          required: false
          description: Maximum number of items to return.
          schema:
            default: 100
            maximum: 1000
            minimum: 1
            title: Limit
            type: integer
        - name: team_id
          in: query
          required: false
          description: >-
            Filter by owning team ID. Preserved by the cursor; if repeated, must
            match the original filter.
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            title: Team Id
        - name: name
          in: query
          required: false
          description: >-
            Filter by exact route name. Preserved by the cursor; if repeated,
            must match the original filter.
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            title: Name
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoutesResponseV1'
      x-codeSamples:
        - lang: bash
          source: |
            curl --request GET \
            --url https://api.baseten.co/v1/routes \
            --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/routes"

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

            response = requests.request(
                "GET",
                url,
                headers=headers,
                params={'cursor': None, 'team_id': None, 'name': None}
            )

            print(response.text)
components:
  schemas:
    RoutesResponseV1:
      properties:
        items:
          description: Items in this page.
          items:
            $ref: '#/components/schemas/RouteV1'
          title: Items
          type: array
        pagination:
          $ref: '#/components/schemas/PaginationResponseV1'
          description: Pagination metadata for the page.
      required:
        - items
        - pagination
      title: RoutesResponseV1
      type: object
    RouteV1:
      properties:
        id:
          description: Stable route identifier.
          title: Id
          type: string
        name:
          description: Immutable name to send in the inference request's model field.
          title: Name
          type: string
        team_id:
          description: Identifier of the owning team.
          title: Team Id
          type: string
        team_name:
          description: Name of the owning team.
          title: Team Name
          type: string
        display_name:
          description: Display label, defaulting to the route name.
          title: Display Name
          type: string
        description:
          description: Short description of the route, empty when unset.
          title: Description
          type: string
        target:
          description: Configured upstream target.
          discriminator:
            mapping:
              ANTHROPIC:
                $ref: '#/components/schemas/RouteTargetAnthropicV1'
              BASETEN_MODEL_API:
                $ref: '#/components/schemas/RouteTargetBasetenModelAPIV1'
              OPENAI:
                $ref: '#/components/schemas/RouteTargetOpenAIV1'
              OPENAI_COMPATIBLE:
                $ref: '#/components/schemas/RouteTargetOpenAICompatibleV1'
              VERTEX:
                $ref: '#/components/schemas/RouteTargetVertexV1'
              XAI:
                $ref: '#/components/schemas/RouteTargetXAIV1'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/RouteTargetBasetenModelAPIV1'
            - $ref: '#/components/schemas/RouteTargetAnthropicV1'
            - $ref: '#/components/schemas/RouteTargetOpenAIV1'
            - $ref: '#/components/schemas/RouteTargetXAIV1'
            - $ref: '#/components/schemas/RouteTargetVertexV1'
            - $ref: '#/components/schemas/RouteTargetOpenAICompatibleV1'
          title: Target
        invoke_url:
          description: Base URL for inference requests using this route.
          title: Invoke Url
          type: string
        created_at:
          description: Creation time, ISO 8601.
          format: date-time
          title: Created At
          type: string
      required:
        - id
        - name
        - team_id
        - team_name
        - display_name
        - description
        - target
        - invoke_url
        - created_at
      title: RouteV1
      type: object
    PaginationResponseV1:
      properties:
        has_more:
          description: Whether more items exist after this page.
          title: Has More
          type: boolean
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Opaque cursor to pass into the next request. Null when there is no
            next page.
          title: Cursor
      required:
        - has_more
      title: PaginationResponseV1
      type: object
    RouteTargetAnthropicV1:
      additionalProperties: false
      properties:
        type:
          const: ANTHROPIC
          description: Target kind for Anthropic.
          title: Type
          type: string
        model:
          description: Model name sent to the provider.
          minLength: 1
          title: Model
          type: string
        secret_name:
          description: Name of a credential secret owned by the route's team.
          minLength: 1
          title: Secret Name
          type: string
      required:
        - type
        - model
        - secret_name
      title: RouteTargetAnthropicV1
      type: object
    RouteTargetBasetenModelAPIV1:
      additionalProperties: false
      properties:
        type:
          const: BASETEN_MODEL_API
          description: Target kind for a Baseten Model API.
          title: Type
          type: string
        model:
          description: Name of the target Model API.
          minLength: 1
          title: Model
          type: string
      required:
        - type
        - model
      title: RouteTargetBasetenModelAPIV1
      type: object
    RouteTargetOpenAIV1:
      additionalProperties: false
      properties:
        type:
          const: OPENAI
          description: Target kind for OpenAI.
          title: Type
          type: string
        model:
          description: Model name sent to the provider.
          minLength: 1
          title: Model
          type: string
        secret_name:
          description: Name of a credential secret owned by the route's team.
          minLength: 1
          title: Secret Name
          type: string
      required:
        - type
        - model
        - secret_name
      title: RouteTargetOpenAIV1
      type: object
    RouteTargetOpenAICompatibleV1:
      additionalProperties: false
      properties:
        type:
          const: OPENAI_COMPATIBLE
          description: Target kind for an OpenAI-compatible provider.
          title: Type
          type: string
        model:
          description: Model name sent to the provider.
          minLength: 1
          title: Model
          type: string
        secret_name:
          description: Name of a credential secret owned by the route's team.
          minLength: 1
          title: Secret Name
          type: string
        base_url:
          description: HTTPS base URL of the OpenAI-compatible provider.
          minLength: 1
          title: Base Url
          type: string
      required:
        - type
        - model
        - secret_name
        - base_url
      title: RouteTargetOpenAICompatibleV1
      type: object
    RouteTargetVertexV1:
      additionalProperties: false
      properties:
        type:
          const: VERTEX
          description: Target kind for Google Vertex AI.
          title: Type
          type: string
        model:
          description: Model name sent to the provider.
          minLength: 1
          title: Model
          type: string
        secret_name:
          description: Name of a credential secret owned by the route's team.
          minLength: 1
          title: Secret Name
          type: string
        vertex_config:
          $ref: '#/components/schemas/VertexTargetConfigV1'
          description: Google Vertex configuration.
      required:
        - type
        - model
        - secret_name
        - vertex_config
      title: RouteTargetVertexV1
      type: object
    RouteTargetXAIV1:
      additionalProperties: false
      properties:
        type:
          const: XAI
          description: Target kind for xAI.
          title: Type
          type: string
        model:
          description: Model name sent to the provider.
          minLength: 1
          title: Model
          type: string
        secret_name:
          description: Name of a credential secret owned by the route's team.
          minLength: 1
          title: Secret Name
          type: string
      required:
        - type
        - model
        - secret_name
      title: RouteTargetXAIV1
      type: object
    VertexTargetConfigV1:
      properties:
        project_id:
          description: Google Cloud project ID or project number.
          examples:
            - my-gcp-project
            - '464036093014'
          title: Project Id
          type: string
        location:
          description: Google Cloud location.
          examples:
            - global
          title: Location
          type: string
      required:
        - project_id
        - location
      title: VertexTargetConfigV1
      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.

````