Skip to main content
Requests

Delete request data

Delete a finished request's input and output files, prompt and parameters now, regardless of its retention. Billing records are kept. Repeating the call returns the same response.

#Endpoint

DELETE https://api.higgsfield.ai/requests/{request_id}

#Authorization

Pass your API key ID and secret in the Authorization header:

Authorization: Key {api_key_id}:{api_key_secret}

#Parameters

Name Location Type Required Description
request_id path string Yes

#Example request

cURL
curl --request DELETE \
  --url https://api.higgsfield.ai/requests/{request_id} \
  --header "Authorization: Key ${HF_API_KEY_ID}:${HF_API_KEY_SECRET}"

#Responses

Status Description
200 The request data was deleted.
401 Missing or invalid API credentials.
404 The request does not exist or belongs to another account.
409 The request is still queued or in progress.
503 Deletion is temporarily unavailable. Retry later.

#Response fields

Field Type Description
request_id string
status string Values: deleted.
Complete OpenAPI specification
yaml
openapi: 3.1.0
info:
  title: Higgsfield API
  version: 2.0.0
  description: Submit generation requests and retrieve their status and outputs.
servers:
  - url: https://api.higgsfield.ai
security:
  - authKey: []
paths:
  /requests/{request_id}:
    delete:
      tags:
        - Requests
      summary: Delete request data
      description: >-
        Delete a finished request's input and output files, prompt and
        parameters now, regardless of its retention. Billing records are kept.
        Repeating the call returns the same response.
      operationId: delete_request
      parameters:
        - name: request_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Request Id
      responses:
        '200':
          description: The request data was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedRequest'
        '401':
          description: Missing or invalid API credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The request does not exist or belongs to another account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: The request is still queued or in progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Deletion is temporarily unavailable. Retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DeletedRequest:
      title: DeletedRequest
      type: object
      properties:
        request_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - deleted
      required:
        - request_id
        - status
    ErrorResponse:
      title: Error response
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  securitySchemes:
    authKey:
      type: apiKey
      in: header
      name: Authorization
      description: Use `Key {api_key_id}:{api_key_secret}`.
Was this page helpful?
Navigation