> ## 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 in the team, newest first, optionally
        filtered by 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: Identifier of the team whose routes to list.
          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: 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:
              BASETEN_MODEL_API: '#/components/schemas/RouteTargetBasetenModelAPIV1'
              CLASSIFIER_MODEL_BASED: '#/components/schemas/RouteTargetClassifierModelBasedV1'
              CONNECTION: '#/components/schemas/RouteTargetConnectionV1'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/RouteTargetBasetenModelAPIV1'
            - $ref: '#/components/schemas/RouteTargetConnectionV1'
            - $ref: '#/components/schemas/RouteTargetClassifierModelBasedV1'
          title: Target
        metadata:
          anyOf:
            - $ref: '#/components/schemas/ExploreMetadataV1'
            - type: 'null'
          description: >-
            Resolved model metadata; for a router, the envelope of its allowed
            routes' metadata. Null when nothing is linked.
        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
        - metadata
        - 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
    RouteTargetBasetenModelAPIV1:
      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
    RouteTargetClassifierModelBasedV1:
      properties:
        type:
          const: CLASSIFIER_MODEL_BASED
          description: Target kind for a classifier-model-based route.
          title: Type
          type: string
        classifier_model_id:
          description: ID of the Baseten model that picks a route for each request.
          examples:
            - abcd123
          title: Classifier Model Id
          type: string
        classifier_environment_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Environment of the classifier model. Null for production.
          examples:
            - production
          title: Classifier Environment Name
        default_route:
          $ref: '#/components/schemas/RouteRefV1'
          description: Route used when the classifier picks none.
        allowed_routes:
          description: Routes the classifier may pick, in creation order.
          items:
            $ref: '#/components/schemas/RouteRefV1'
          title: Allowed Routes
          type: array
      required:
        - type
        - classifier_model_id
        - classifier_environment_name
        - default_route
        - allowed_routes
      title: RouteTargetClassifierModelBasedV1
      type: object
    RouteTargetConnectionV1:
      properties:
        type:
          const: CONNECTION
          description: Target kind for a provider reached through a team connection.
          title: Type
          type: string
        model:
          description: Model name sent to the provider.
          minLength: 1
          title: Model
          type: string
        connection_id:
          description: Identifier of the team connection authenticating with the provider.
          title: Connection Id
          type: string
      required:
        - type
        - model
        - connection_id
      title: RouteTargetConnectionV1
      type: object
    ExploreMetadataV1:
      properties:
        slug:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Metadata slug, e.g. 'anthropic/claude-opus-4'; null for rows without
            one.
          title: Slug
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Model display name, when available.
          title: Display Name
        release_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: >-
            Model release date. Month-only source dates use the first day of
            that month.
          title: Release Date
        provider:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Provider key derived from the slug prefix, e.g. 'anthropic'; null
            for unprefixed slugs.
          title: Provider
        context_window:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total context window in tokens.
          title: Context Window
        max_output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          description: Maximum output tokens per response.
          title: Max Output Tokens
        input_modalities:
          description: Accepted input modalities.
          items:
            type: string
          title: Input Modalities
          type: array
        tools:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the model supports tool calling.
          title: Tools
        reasoning_effort_levels:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Reasoning effort levels the model supports.
          title: Reasoning Effort Levels
        parallel_tool_calls:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the model supports parallel tool calls.
          title: Parallel Tool Calls
        supported_api_formats:
          anyOf:
            - $ref: '#/components/schemas/ExploreMetadataAPIFormatsV1'
            - type: 'null'
          description: API formats the model supports.
        cost:
          anyOf:
            - $ref: '#/components/schemas/ExploreCostV1'
            - type: 'null'
          description: Provider list prices in USD per 1M tokens, when available.
      required:
        - slug
        - display_name
        - release_date
        - provider
        - context_window
        - max_output_tokens
        - input_modalities
        - tools
        - reasoning_effort_levels
        - parallel_tool_calls
        - supported_api_formats
        - cost
      title: ExploreMetadataV1
      type: object
    RouteRefV1:
      properties:
        id:
          description: Stable route identifier.
          title: Id
          type: string
        slug:
          description: Name of the route to send in the inference request's model field.
          title: Slug
          type: string
      required:
        - id
        - slug
      title: RouteRefV1
      type: object
    ExploreMetadataAPIFormatsV1:
      properties:
        messages:
          default: false
          description: Anthropic Messages API support.
          title: Messages
          type: boolean
        responses:
          default: false
          description: OpenAI Responses API support.
          title: Responses
          type: boolean
        chat_completions:
          default: false
          description: OpenAI Chat Completions API support.
          title: Chat Completions
          type: boolean
      title: ExploreMetadataAPIFormatsV1
      type: object
    ExploreCostV1:
      properties:
        input:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens, when available.
          title: Input
        output:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M output tokens, when available.
          title: Output
        cache_read:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens read from cache, when available.
          title: Cache Read
        cache_write:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens written to cache, when available.
          title: Cache Write
        long_context:
          anyOf:
            - $ref: '#/components/schemas/ExploreCostValuesV1'
            - type: 'null'
          default: null
          description: >-
            Prices for long-context requests, when the provider tiers by context
            length.
      title: ExploreCostV1
      type: object
    ExploreCostValuesV1:
      properties:
        input:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens, when available.
          title: Input
        output:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M output tokens, when available.
          title: Output
        cache_read:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens read from cache, when available.
          title: Cache Read
        cache_write:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens written to cache, when available.
          title: Cache Write
      title: ExploreCostValuesV1
      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.

````