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

# Get prompt optimization job status and details.

> 
Returns the current status of the prompt optimization job, including progress information
for polling. When complete, includes the optimized_version_id and optionally
test_run_id and comparison_id if run_test_after_optimization was True.



## OpenAPI

````yaml https://app.freeplay.ai/openapi.json get /api/v2/projects/{project_id}/prompt-optimization-jobs/{job_id}
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}:
    get:
      tags:
        - Prompt Optimization
      summary: Get prompt optimization job status and details.
      description: >-

        Returns the current status of the prompt optimization job, including
        progress information

        for polling. When complete, includes the optimized_version_id and
        optionally

        test_run_id and comparison_id if run_test_after_optimization was True.
      operationId: get_get_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:
                  job_id:
                    format: uuid
                    title: Job Id
                    type: string
                  status:
                    title: Status
                    type: string
                  prompt_template_id:
                    format: uuid
                    title: Prompt Template Id
                    type: string
                  original_version_id:
                    format: uuid
                    title: Original Version Id
                    type: string
                  run_test_after_optimization:
                    title: Run Test After Optimization
                    type: boolean
                  created_at:
                    format: date-time
                    title: Created At
                    type: string
                  optimized_version_id:
                    default: null
                    title: Optimized Version Id
                    format: uuid
                    type:
                      - string
                      - 'null'
                  test_run_id:
                    default: null
                    title: Test Run Id
                    format: uuid
                    type:
                      - string
                      - 'null'
                  comparison_id:
                    default: null
                    title: Comparison Id
                    format: uuid
                    type:
                      - string
                      - 'null'
                  changes_summary:
                    default: null
                    title: Changes Summary
                    type:
                      - string
                      - 'null'
                  error_message:
                    default: null
                    title: Error Message
                    type:
                      - string
                      - 'null'
                  data_sources_used:
                    default: null
                    oneOf:
                      - $ref: '#/components/schemas/DataSourcesUsed'
                      - type: 'null'
                  completed_at:
                    default: null
                    title: Completed At
                    format: date-time
                    type:
                      - string
                      - 'null'
                  progress:
                    default: null
                    oneOf:
                      - $ref: '#/components/schemas/JobProgress'
                      - type: 'null'
                required:
                  - job_id
                  - status
                  - prompt_template_id
                  - original_version_id
                  - run_test_after_optimization
                  - created_at
                title: PromptOptimizationJobStatusResponse
                type: object
          description: >-
            PromptOptimizationJobStatusResponse(job_id: uuid.UUID, status: str,
            prompt_template_id: uuid.UUID, original_version_id: uuid.UUID,
            run_test_after_optimization: bool, created_at: datetime.datetime,
            optimized_version_id: Optional[uuid.UUID] = None, test_run_id:
            Optional[uuid.UUID] = None, comparison_id: Optional[uuid.UUID] =
            None, changes_summary: Optional[str] = None, error_message:
            Optional[str] = None, data_sources_used:
            Optional[server.api_routes.prompt_optimization_jobs_api_v2.DataSourcesUsed]
            = None, completed_at: Optional[datetime.datetime] = None, progress:
            Optional[server.api_routes.prompt_optimization_jobs_api_v2.JobProgress]
            = None)
components:
  schemas:
    DataSourcesUsed:
      properties:
        human_labels_count:
          title: Human Labels Count
          type: integer
        customer_feedback_count:
          title: Customer Feedback Count
          type: integer
      required:
        - human_labels_count
        - customer_feedback_count
      title: DataSourcesUsed
      type: object
    JobProgress:
      properties:
        step:
          title: Step
          type: integer
        total_steps:
          title: Total Steps
          type: integer
        step_name:
          title: Step Name
          type: string
      required:
        - step
        - total_steps
        - step_name
      title: JobProgress
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````