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

# Refine Skill

> Refine a skill based on feedback.



## OpenAPI

````yaml /cloud/openapi/v2.json post /skills/{skill_id}/refine
openapi: 3.1.0
info:
  title: Browser Use Public API v2
  summary: Browser Use API for running web agents (v2)
  version: 2.0.0
servers:
  - url: https://api.browser-use.com/api/v2
    description: Production server
security: []
paths:
  /skills/{skill_id}/refine:
    post:
      tags:
        - Skills
      summary: Refine Skill
      description: Refine a skill based on feedback.
      operationId: refine_skill_skills__skill_id__refine_post
      parameters:
        - name: skill_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Skill Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefineSkillRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefineSkillResponse'
        '400':
          description: Skill is not finished or is public
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillNotFinishedError'
        '404':
          description: Skill not found or no code available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillNotFoundError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many concurrent active sessions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyConcurrentActiveSessionsError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RefineSkillRequest:
      properties:
        feedback:
          type: string
          minLength: 10
          title: Feedback
          description: Feedback describing what to improve
        testOutput:
          anyOf:
            - type: string
            - type: 'null'
          title: Testoutput
          description: Last skill test output to include in refinement context
        testLogs:
          anyOf:
            - type: string
            - type: 'null'
          title: Testlogs
          description: Last skill test logs to include in refinement context
      type: object
      required:
        - feedback
      title: RefineSkillRequest
      description: Request to refine an existing skill.
    RefineSkillResponse:
      properties:
        id:
          type: string
          format: uuid
          title: ID
          description: Unique identifier for the skill
      type: object
      required:
        - id
      title: RefineSkillResponse
      description: Response after requesting skill refinement.
    SkillNotFinishedError:
      properties:
        detail:
          type: string
          title: Detail
          default: Skill is not finished
      type: object
      title: SkillNotFinishedError
      description: Error response when skill is not finished
    SkillNotFoundError:
      properties:
        detail:
          type: string
          title: Detail
          default: Skill not found
      type: object
      title: SkillNotFoundError
      description: Error response when a skill is not found
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TooManyConcurrentActiveSessionsError:
      properties:
        detail:
          type: string
          title: Detail
          default: >-
            Too many concurrent active sessions. Please wait for one to finish,
            kill one, or upgrade your plan.
      type: object
      title: TooManyConcurrentActiveSessionsError
      description: Error response when user has too many concurrent active sessions
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Browser-Use-API-Key

````