> ## 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 model deployment startup summary

> Gets startup duration distributions for a model deployment.

<Note>
  This endpoint is in beta. The request and response structure may change before it's generally available.
  Startup metrics require access for your organization. [Contact support](mailto:support@baseten.co) to request access.
</Note>


## OpenAPI

````yaml get /v1/models/{model_id}/deployments/{deployment_id}/startups/summary
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/models/{model_id}/deployments/{deployment_id}/startups/summary:
    parameters:
      - $ref: '#/components/parameters/model_id'
      - $ref: '#/components/parameters/deployment_id'
    get:
      summary: Gets the startup summary for a model deployment
      description: >-
        Gets the distribution of replica startup durations, in total and per
        phase, in the given time range.
      parameters:
        - name: start_epoch_millis
          in: query
          required: true
          description: Start of the query window, in epoch milliseconds.
          schema:
            title: Start Epoch Millis
            type: integer
        - name: end_epoch_millis
          in: query
          required: true
          description: >-
            End of the query window, in epoch milliseconds. Must be after the
            start.
          schema:
            title: End Epoch Millis
            type: integer
        - name: min_duration_ms
          in: query
          required: false
          description: Only include startups that lasted at least this many milliseconds.
          schema:
            anyOf:
              - minimum: 0
                type: integer
              - type: 'null'
            default: null
            title: Min Duration Ms
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartupSummaryV1'
      x-codeSamples:
        - lang: bash
          source: >
            curl --request GET \

            --url
            https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/startups/summary
            \

            --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/models/{model_id}/deployments/{deployment_id}/startups/summary"


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


            response = requests.request(
                "GET",
                url,
                headers=headers,
                params={'start_epoch_millis': None, 'end_epoch_millis': None, 'min_duration_ms': None}
            )


            print(response.text)
components:
  parameters:
    model_id:
      schema:
        type: string
      name: model_id
      in: path
      required: true
    deployment_id:
      schema:
        type: string
      name: deployment_id
      in: path
      required: true
  schemas:
    StartupSummaryV1:
      description: Startup duration distributions over a time window.
      properties:
        start_epoch_millis:
          description: Start of the returned window.
          title: Start Epoch Millis
          type: integer
        end_epoch_millis:
          description: End of the returned window.
          title: End Epoch Millis
          type: integer
        total_duration_ms:
          $ref: '#/components/schemas/StartupPercentilesV1'
          description: >-
            Durations of whole startups, sampled from the 1,000 most recent in
            the window.
        phase_duration_ms:
          description: Durations of each phase that was recorded in the window.
          items:
            $ref: '#/components/schemas/StartupPhasePercentilesV1'
          title: Phase Duration Ms
          type: array
      required:
        - start_epoch_millis
        - end_epoch_millis
        - total_duration_ms
        - phase_duration_ms
      title: StartupSummaryV1
      type: object
    StartupPercentilesV1:
      description: >-
        A distribution of startup durations.


        Statistics cover only samples longer than 0 ms and are null when there
        are none.
      properties:
        sample_count:
          description: >-
            Number of startups in the distribution, including those that took 0
            ms. A phase that finishes within a second can record 0 ms.
          title: Sample Count
          type: integer
        mean_ms:
          anyOf:
            - type: integer
            - type: 'null'
          description: Mean duration, in milliseconds.
          title: Mean Ms
        p50_ms:
          anyOf:
            - type: integer
            - type: 'null'
          description: 50th percentile duration, in milliseconds.
          title: P50 Ms
        p90_ms:
          anyOf:
            - type: integer
            - type: 'null'
          description: 90th percentile duration, in milliseconds.
          title: P90 Ms
        p95_ms:
          anyOf:
            - type: integer
            - type: 'null'
          description: 95th percentile duration, in milliseconds.
          title: P95 Ms
        p99_ms:
          anyOf:
            - type: integer
            - type: 'null'
          description: 99th percentile duration, in milliseconds.
          title: P99 Ms
      required:
        - sample_count
        - mean_ms
        - p50_ms
        - p90_ms
        - p95_ms
        - p99_ms
      title: StartupPercentilesV1
      type: object
    StartupPhasePercentilesV1:
      description: The duration distribution of one startup phase.
      properties:
        phase:
          $ref: '#/components/schemas/StartupPhaseV1'
          description: The phase.
        duration_ms:
          $ref: '#/components/schemas/StartupPercentilesV1'
          description: Durations of the phase.
      required:
        - phase
        - duration_ms
      title: StartupPhasePercentilesV1
      type: object
    StartupPhaseV1:
      description: >-
        A stage of a replica startup.


        - ``SCHEDULING``: waiting for the replica to be placed on a node.

        - ``IMAGE_PULL``: pulling the container image.

        - ``WEIGHT_DOWNLOAD``: downloading model weights.

        - ``CONTAINER_CREATE``: creating and starting the model container,
        including
          ``CONTAINER_START`` and ``READINESS``.
        - ``CONTAINER_START``: starting the model container.

        - ``READINESS``: waiting for the model to pass its readiness check.


        ``CONTAINER_START`` and ``READINESS`` are accepted as filters but are
        reported only as

        part of ``CONTAINER_CREATE``.
      enum:
        - SCHEDULING
        - IMAGE_PULL
        - WEIGHT_DOWNLOAD
        - CONTAINER_CREATE
        - CONTAINER_START
        - READINESS
      title: StartupPhaseV1
      type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````