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

# Cancel a pending or in-progress prompt optimization job.

> 
Only jobs that have not yet completed can be cancelled.



## OpenAPI

````yaml https://app.freeplay.ai/openapi.json post /api/v2/projects/{project_id}/prompt-optimization-jobs/{job_id}/cancel
openapi: 3.1.0
info:
  title: Freeplay API
  version: 0.1.0
servers: []
security:
  - BearerAuth: []
paths:
  /api/v2/projects/{project_id}/prompt-optimization-jobs/{job_id}/cancel:
    post:
      tags:
        - Prompt Optimization
      summary: Cancel a pending or in-progress prompt optimization job.
      description: |-

        Only jobs that have not yet completed can be cancelled.
      operationId: post_cancel_prompt_optimization_job
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: job_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties: {}
                title: EmptyResponse
                type: object
          description: EmptyResponse()
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````