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

# Delete spec

> Delete a spec by ID



## OpenAPI

````yaml DELETE /api/dataframer/specs/{spec_id}/
openapi: 3.0.0
info:
  title: DataFramer API
  version: 0.1.0
  description: ''
  termsOfService: https://www.aimon.ai/docs/privacy-policy.pdf
  contact:
    name: DataFramer Support
    email: info@dataframer.ai
  license:
    name: Proprietary
  x-logo:
    url: https://dataframer.ai/logo.png
    altText: DataFramer AI
  x-stainless:
    package-name: aimon-dataframer
    namespace:
      - aimon
      - dataframer
servers:
  - url: https://df-api.dataframer.ai
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: Seed Datasets
    description: Manage seed datasets for generation
  - name: Specs
    description: Data specifications for sample generation
  - name: Runs
    description: Generation runs and results
  - name: Evaluations
    description: Evaluate generated sample quality
  - name: Red Teaming
    description: Security testing and adversarial prompts
  - name: Spec Creation
    description: Create specs from datasets or from scratch (seedless)
  - name: Generation
    description: Synthetic data generation
  - name: API Keys
    description: API key management and rotation
  - name: Health
    description: Health check endpoints
  - name: Models
    description: Available AI models
externalDocs:
  description: Complete API Guide
  url: https://docs.dataframer.ai/dataframer
paths:
  /api/dataframer/specs/{spec_id}/:
    parameters:
      - name: spec_id
        in: path
        description: UUID of the spec
        required: true
        schema:
          type: string
          format: uuid
    delete:
      tags:
        - Specs
      summary: Delete spec
      description: Delete a spec by ID
      operationId: api_dataframer_specs_delete
      parameters:
        - name: force
          in: query
          description: >-
            If true, delete the spec and all associated runs (including their
            generated files). If false or omitted, returns an error when runs
            exist.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '204':
          description: Spec deleted successfully
        '400':
          description: Cannot delete spec with associated runs without force=true
        '401':
          description: Unauthorized - Invalid or missing authentication token
        '404':
          description: Spec not found
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Dataframer from 'dataframer';


            const client = new Dataframer({
              apiKey: process.env['DATAFRAMER_API_KEY'], // This is the default and can be omitted
            });


            await
            client.dataframer.specs.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
        - lang: Python
          source: |-
            import os
            from dataframer import Dataframer

            client = Dataframer(
                api_key=os.environ.get("DATAFRAMER_API_KEY"),  # This is the default and can be omitted
            )
            client.dataframer.specs.delete(
                spec_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API Key authentication. Format: "Bearer YOUR_API_KEY"'

````