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

# Create an endpoint

> Creates a stable, inference-addressable endpoint. Add one or more deployments and configure its traffic split before sending inference requests to the endpoint name.



## OpenAPI

````yaml POST /projects/{projectId}/endpoints
openapi: 3.1.0
info:
  title: Together APIs
  description: The Together REST API. See https://docs.together.ai for more details.
  version: 2.0.0
  termsOfService: https://www.together.ai/terms-of-service
  contact:
    name: Together Support
    url: https://www.together.ai/contact
  license:
    name: MIT
    url: https://github.com/togethercomputer/openapi/blob/main/LICENSE
servers:
  - url: https://api.together.ai/v1
    description: Default environment for APIs
  - url: https://api-inference.together.ai/v2
    description: Optimized environment for inference
security:
  - bearerAuth: []
paths:
  /projects/{projectId}/endpoints:
    post:
      tags:
        - EndpointService
      summary: Create an endpoint
      description: >-
        Creates a stable, inference-addressable endpoint. Add one or more
        deployments and configure its traffic split before sending inference
        requests to the endpoint name.
      operationId: EndpointService_CreateEndpoint
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            description: Project identifier.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DE.CreateEndpointRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DE.Endpoint'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
      servers:
        - url: https://api.together.ai/v2
components:
  schemas:
    DE.CreateEndpointRequest:
      type: object
      description: Request parameters for creating an endpoint.
      required:
        - name
      properties:
        name:
          type: string
          description: Inference-addressable endpoint name to create.
        visibility:
          default: VISIBILITY_PRIVATE
          enum:
            - VISIBILITY_PRIVATE
            - VISIBILITY_INTERNAL
          type: string
          description: >-
            Who can discover the endpoint. `VISIBILITY_PRIVATE` restricts it to
            the project; `VISIBILITY_INTERNAL` shares it with the organization.
    DE.Endpoint:
      description: >-
        Stable inference entry point that groups deployments and routes requests
        among them.
      type: object
      required:
        - name
        - id
        - projectId
        - createdAt
        - updatedAt
        - etag
        - deployments
        - trafficSplit
        - visibility
        - endpointType
      properties:
        id:
          readOnly: true
          description: Unique endpoint identifier.
          type: string
        projectId:
          readOnly: true
          type: string
          description: ID of the project that owns the endpoint.
        name:
          type: string
          description: >-
            Project-qualified endpoint name in the form
            `<project_slug>/<endpoint_name>`.

            Pass this value as `model` in inference requests. Create and update
            requests

            may use either a bare endpoint name or the qualified form; a
            supplied project

            slug must match the project in the request path.
        createdAt:
          readOnly: true
          type: string
          description: Timestamp when the endpoint was created.
          format: date-time
        updatedAt:
          type: string
          description: Output only. Timestamp when the endpoint was last updated.
          format: date-time
        etag:
          type: string
          description: |-
            Opaque version tag for optimistic concurrency control.
            Supply on update/delete to ensure consistent read-modify-write.
            If not set, the write overwrites based on current state.
        trafficSplit:
          type: array
          items:
            $ref: '#/components/schemas/DE.TrafficSplitEntry'
          description: >-
            Deployments eligible for live traffic and their capacity weights. An
            empty list leaves the endpoint unrouted.
        visibility:
          default: VISIBILITY_PRIVATE
          enum:
            - VISIBILITY_PRIVATE
            - VISIBILITY_INTERNAL
          type: string
          description: >-
            Who can discover the endpoint. `VISIBILITY_PRIVATE` restricts it to
            the project; `VISIBILITY_INTERNAL` shares it with the organization.
        endpointType:
          readOnly: true
          enum:
            - ENDPOINT_TYPE_DEDICATED
            - ENDPOINT_TYPE_SERVERLESS
          type: string
          description: Serving class of the endpoint.
        deployments:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/DE.DeploymentSummary'
          description: >-
            Lightweight summaries of deployments under this endpoint.

            Retrieve a deployment through the endpoint's deployment API for full
            details.
        activeRolloutId:
          readOnly: true
          type: string
          description: ID of the currently active rollout, or empty if none.
    ErrorData:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              nullable: false
            type:
              type: string
              nullable: false
            param:
              type: string
              nullable: true
              default: null
            code:
              type: string
              nullable: true
              default: null
          required:
            - type
            - message
    DE.TrafficSplitEntry:
      type: object
      description: >-
        Capacity weight assigned to one deployment in an endpoint's live traffic
        split.
      required:
        - deploymentId
        - weight
      properties:
        deploymentId:
          type: string
          description: ID of a deployment under the endpoint that can receive live traffic.
        weight:
          type: number
          description: >-
            Non-negative, finite weight applied to each ready replica. A
            deployment's

            effective routing capacity is `weight * readyReplicas`, and requests
            are

            distributed in proportion to that capacity. Set to `0` to remove the

            deployment from the live traffic split.
    DE.DeploymentSummary:
      type: object
      description: Compact deployment status embedded in an endpoint response.
      required:
        - id
        - autoscaling
        - createdAt
        - hardware
        - model
        - modelId
        - name
        - state
        - trafficMode
      properties:
        id:
          readOnly: true
          type: string
          description: Deployment identifier.
        modelId:
          type: string
          description: Deprecated. Use `model`. Model identifier being served.
        hardware:
          readOnly: true
          type: string
          description: >-
            Hardware configuration selected by the deployment's config, such as
            its GPU type and count.
        trafficMode:
          enum:
            - TRAFFIC_MODE_LIVE
            - TRAFFIC_MODE_SHADOW
          type: string
          description: >-
            Whether the deployment serves client-visible responses or only
            mirrored shadow traffic.
        state:
          readOnly: true
          enum:
            - DEPLOYMENT_STATE_PROVISIONING
            - DEPLOYMENT_STATE_READY
            - DEPLOYMENT_STATE_SCALING
            - DEPLOYMENT_STATE_DEGRADED
            - DEPLOYMENT_STATE_FAILED
            - DEPLOYMENT_STATE_STOPPED
            - DEPLOYMENT_STATE_STOPPING
          type: string
          description: Current state of the deployment.
        name:
          readOnly: true
          type: string
          description: >-
            Inference-addressable name in the fully-qualified form

            "<project_slug>/<endpoint_name>/<deployment_name>". Pass it as the

            "model" field when calling the inference API to pin to this
            deployment.
        createdAt:
          readOnly: true
          type: string
          description: Timestamp when the deployment was created.
          format: date-time
        autoscaling:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/DE.AutoscalingResponse'
          description: Autoscaling configuration for the deployment.
        desiredReplicas:
          readOnly: true
          type: integer
          description: >-
            Number of replicas the autoscaler currently wants across all
            regions.
        readyReplicas:
          readOnly: true
          type: integer
          description: >-
            Number of replicas currently ready to serve requests across all
            regions.
        model:
          type: string
          description: >-
            Resource name of the served model in the form

            `projects/{projectId}/models/{modelId}/revisions/{revisionId}`.

            For public models, the model's owning project may differ from the
            deployment's project.
        estimatedEffectiveTrafficShare:
          readOnly: true
          type: number
          format: double
          description: >-
            Estimated fraction from 0 to 1 of endpoint traffic currently routed
            to this deployment.
    DE.AutoscalingResponse:
      description: Resolved autoscaling configuration returned for a deployment.
      allOf:
        - $ref: '#/components/schemas/DE.Autoscaling'
        - type: object
          required:
            - minReplicas
            - maxReplicas
    DE.Autoscaling:
      type: object
      properties:
        minReplicas:
          type: integer
          description: >-
            Minimum number of replicas. Omit on update to preserve the current
            value. Set both `minReplicas` and `maxReplicas` to `0` to stop the
            deployment.
        maxReplicas:
          type: integer
          description: >-
            Maximum number of replicas. Defaults to `minReplicas`; omitting it
            on update preserves the current value.
        scaleDownWindow:
          pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
          type: string
          description: >-
            Time a lower replica recommendation must remain stable before
            scaling down. Defaults to `5m`.
        scaleUpWindow:
          pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
          type: string
          description: Stabilization window before scaling up.
        scaleToZeroWindow:
          pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
          type: string
          description: >-
            Idle period after which the deployment automatically stops and
            releases its replicas.
        scalingMetrics:
          type: array
          items:
            $ref: '#/components/schemas/DE.ScalingMetric'
          description: >-
            Metrics and targets that drive replica recommendations. When
            omitted, the platform uses concurrent in-flight requests per
            replica.
      description: Autoscaling configuration for a deployment.
    DE.ScalingMetric:
      type: object
      properties:
        name:
          type: string
          description: >-
            Metric name, such as `gpu_utilization`, `ttft`, `inflight_requests`,
            `e2e_latency`, `throughput_per_replica`, or `decoding_speed`.
        type:
          enum:
            - METRIC_TARGET_TYPE_VALUE
            - METRIC_TARGET_TYPE_UTILIZATION
            - METRIC_TARGET_TYPE_AVERAGE_VALUE
          type: string
          description: >-
            Whether `target` is an absolute value, a utilization percentage, or
            a per-replica average.
        target:
          type: number
          description: >-
            Target interpreted according to `type`. Utilization uses a
            percentage from 0 to 100, value uses an absolute measurement, and
            average value uses a per-replica measurement.
        percentile:
          type: string
          description: >-
            Percentile to evaluate for latency-based metrics: `p50`, `p90`,
            `p95`, or `p99`.
      description: Metric and target used by the autoscaler to recommend a replica count.
      required:
        - name
        - type
        - target
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default

````