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

# Remove a deployment adapter

> Detaches an adapter attachment by its `dad_` id using its row-level etag for optimistic concurrency.



## OpenAPI

````yaml openapi.yaml DELETE /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{deploymentId}/adapters/{id}
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
    description: Default environment for APIs
security:
  - bearerAuth: []
paths:
  /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{deploymentId}/adapters/{id}:
    delete:
      tags:
        - DeploymentService
      summary: Remove a deployment adapter
      description: >-
        Detaches an adapter attachment by its `dad_` id using its row-level etag
        for optimistic concurrency.
      operationId: DeploymentService_RemoveAdapter
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
            description: Project identifier.
        - name: endpointId
          in: path
          required: true
          schema:
            description: Endpoint identifier.
            type: string
        - name: deploymentId
          in: path
          required: true
          schema:
            description: Deployment identifier.
            type: string
        - name: id
          in: path
          required: true
          schema:
            description: >-
              Adapter attachment `dad_` id from a prior add, update, get, or
              list response.
            type: string
        - name: etag
          in: query
          required: true
          schema:
            type: string
            description: >-
              Adapter etag from a previous add, update, get, or list response.
              The removal is rejected if the adapter changed after that
              response.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DE.DeleteResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
      x-codeSamples:
        - lang: Python
          label: Together AI SDK (Python)
          source: |
            from together import Together

            client = Together()
            identity = client.whoami()
            if identity.type != "project_api_key":
                raise RuntimeError("TOGETHER_API_KEY must be a project API key")
            project_id = identity.project.id

            # Read the attachment first: removing it requires its current etag.
            adapter = client.endpoints.adapters.retrieve(
                "dad_abc123",
                project_id=project_id,
                endpoint_id="ep_abc123",
                deployment_id="dep_abc123",
            )

            client.endpoints.adapters.delete(
                "dad_abc123",
                project_id=project_id,
                endpoint_id="ep_abc123",
                deployment_id="dep_abc123",
                etag=adapter.etag,
            )
        - lang: TypeScript
          label: Together AI SDK (TypeScript)
          source: >
            import Together from "together-ai";


            const client = new Together();

            const identity = await client.whoami();

            if (identity.type !== "project_api_key") {
              throw new Error("TOGETHER_API_KEY must be a project API key");
            }

            const projectId = identity.project.id;


            // Read the attachment first: removing it requires its current etag.

            const adapter = await
            client.endpoints.adapters.retrieve("dad_abc123", {
              projectId,
              endpointId: "ep_abc123",
              deploymentId: "dep_abc123",
            });


            await client.endpoints.adapters.delete("dad_abc123", {
              projectId,
              endpointId: "ep_abc123",
              deploymentId: "dep_abc123",
              etag: adapter.etag,
            });
        - lang: JavaScript
          label: Together AI SDK (JavaScript)
          source: >
            import Together from "together-ai";


            const client = new Together();

            const identity = await client.whoami();

            if (identity.type !== "project_api_key") {
              throw new Error("TOGETHER_API_KEY must be a project API key");
            }

            const projectId = identity.project.id;


            // Read the attachment first: removing it requires its current etag.

            const adapter = await
            client.endpoints.adapters.retrieve("dad_abc123", {
              projectId,
              endpointId: "ep_abc123",
              deploymentId: "dep_abc123",
            });


            await client.endpoints.adapters.delete("dad_abc123", {
              projectId,
              endpointId: "ep_abc123",
              deploymentId: "dep_abc123",
              etag: adapter.etag,
            });
components:
  schemas:
    DE.DeleteResponse:
      type: object
      properties: {}
      additionalProperties: false
      x-stainless-empty-object: true
      description: Empty response returned after a successful delete operation.
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.