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

# Delete a model

> Permanently deletes a custom model resource. The model must not be in use by an active deployment.



## OpenAPI

````yaml openapi.yaml DELETE /v2/projects/{projectId}/models/{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}/models/{id}:
    delete:
      tags:
        - VolumeService
      summary: Delete a model
      description: >-
        Permanently deletes a custom model resource. The model must not be in
        use by an active deployment.
      operationId: VolumeService_DeleteModel
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
            description: ID of the project that owns the model.
        - name: id
          in: path
          required: true
          schema:
            description: Model identifier.
            type: string
      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

            client.models.delete("ml_abc123", project_id=project_id)
        - 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;

            await client.models.delete("ml_abc123", { projectId });
        - 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;

            await client.models.delete("ml_abc123", { projectId });
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.