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

# Create a job

> Returns at once with `202 Accepted` and the job in the `queued` state. The `Location` header holds the job path. Read the job with Get a job until it is `done` or `failed`.



## OpenAPI

````yaml /openapi.json post /v1/jobs
openapi: 3.1.0
info:
  title: bapsolver API
  version: 0.2.0
  description: >-
    Submit a token job for a page and its public reCAPTCHA v3 site key, then
    poll the job for the token.
servers:
  - url: https://api.bapsolver.xyz
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Jobs
    description: Create, read, list and cancel token jobs.
  - name: Service
    description: Service health.
paths:
  /v1/jobs:
    post:
      tags:
        - Jobs
      summary: Create a job
      description: >-
        Returns at once with `202 Accepted` and the job in the `queued` state.
        The `Location` header holds the job path. Read the job with Get a job
        until it is `done` or `failed`.
      operationId: createJob
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobRequest'
      responses:
        '202':
          description: The job was queued.
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  Server-generated correlation identifier; caller-supplied
                  identifiers are ignored.
            Location:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  requestId:
                    type: string
                    format: uuid
                    description: >-
                      Server-generated correlation identifier; caller-supplied
                      identifiers are ignored.
                  data:
                    $ref: '#/components/schemas/Job'
                required:
                  - ok
                  - requestId
                  - data
                additionalProperties: false
              examples:
                queued:
                  value:
                    ok: true
                    requestId: 0f6c1d2e-8a4b-4c3d-9e1f-2a3b4c5d6e7f
                    data:
                      id: 3b1f7c9a-2d4e-4f6a-8b0c-1d2e3f4a5b6c
                      kind: recap_v3
                      url: https://www.example.com/login
                      siteKey: YOUR_SITE_KEY
                      action: login
                      status: queued
                      createdAt: '2026-10-25T09:30:00.000Z'
        '400':
          description: >-
            Invalid request: an unknown field or kind, a wrong type, a proxy on
            a kind that takes none or missing on one that needs it, a bad URL or
            action.
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  Server-generated correlation identifier; caller-supplied
                  identifiers are ignored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Bearer credentials are missing or invalid.
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  Server-generated correlation identifier; caller-supplied
                  identifiers are ignored.
            WWW-Authenticate:
              schema:
                const: Bearer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: The JSON request body exceeds 1 MiB.
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  Server-generated correlation identifier; caller-supplied
                  identifiers are ignored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: The request rate or the job queue limit was reached.
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  Server-generated correlation identifier; caller-supplied
                  identifiers are ignored.
            Retry-After:
              schema:
                type: integer
                minimum: 1
              description: Seconds before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected server failure.
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  Server-generated correlation identifier; caller-supplied
                  identifiers are ignored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            The service cannot accept jobs: SANDBOX_DISABLED when it is not set
            up to run jobs, or SHUTTING_DOWN while it restarts. Retry
            SHUTTING_DOWN after a short wait.
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  Server-generated correlation identifier; caller-supplied
                  identifiers are ignored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    JobRequest:
      type: object
      properties:
        kind:
          type: string
          enum:
            - recap_v3
            - recap_v3_enterprise
            - recap_v3_proxy
            - recap_v3_enterprise_proxy
          description: >-
            recap_v3: reCAPTCHA v3. recap_v3_enterprise: reCAPTCHA Enterprise.
            The _proxy kinds run through the proxy sent with the job; the others
            take none.
        url:
          type: string
          format: uri
          maxLength: 4096
          description: The page the challenge is on; the token is for its origin.
        siteKey:
          type: string
          minLength: 1
          maxLength: 256
        action:
          type: string
          pattern: ^[A-Za-z0-9/_]+$
          minLength: 1
          maxLength: 100
          default: submit
          description: The reCAPTCHA v3 action.
        proxy:
          type: string
          minLength: 3
          maxLength: 512
          description: >-
            Proxy for the _proxy kinds: a pool id or IP:PORT:USER:PASS.
            Credentials are never echoed back.
      required:
        - kind
        - url
        - siteKey
      additionalProperties: false
      examples:
        - kind: recap_v3
          url: https://example.com/login
          siteKey: 6Lc...
          action: login
        - kind: recap_v3_enterprise_proxy
          url: https://example.com/
          siteKey: 6Lc...
          proxy: 203.0.113.7:8080:user:pass
    Job:
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - recap_v3
            - recap_v3_enterprise
            - recap_v3_proxy
            - recap_v3_enterprise_proxy
        url:
          type: string
        siteKey:
          type: string
        action:
          type: string
        status:
          type: string
          enum:
            - queued
            - running
            - done
            - failed
          description: >-
            Poll until done or failed (GET with ?wait=N holds the request until
            then). A token is good for about two minutes.
        createdAt:
          type: string
          format: date-time
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
        result:
          type: object
          properties:
            token:
              type: string
              maxLength: 32768
            expiresAt:
              type:
                - string
                - 'null'
              format: date-time
              description: >-
                When the token stops being accepted: the validity the response
                gave, counted from the job start, so never later than the real
                moment.
            userAgent:
              type: string
              description: >-
                The user agent the token was made as: send it in each request to
                the site.
            acceptLanguage:
              type: string
              description: The Accept-Language the token was made with.
            secUa:
              type: string
              description: >-
                The sec-ch-ua header the token was made with; absent for a
                device that sends no client hints.
            secUaMobile:
              type: string
              description: The sec-ch-ua-mobile header; absent with secUa.
            secUaPlatform:
              type: string
              description: The sec-ch-ua-platform header; absent with secUa.
          required:
            - token
            - expiresAt
            - userAgent
            - acceptLanguage
          additionalProperties: false
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                A stable code: JOB_CANCELLED, JOB_TIMEOUT or SHUTTING_DOWN from
                the queue, else the code of the run that failed, such as
                SANDBOX_SOLVE_FAILED, UPSTREAM_TIMEOUT or
                PROTOCOL_EXECUTION_FAILED.
            message:
              type: string
          required:
            - code
            - message
          additionalProperties: false
      required:
        - id
        - kind
        - url
        - siteKey
        - action
        - status
        - createdAt
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        ok:
          const: false
        requestId:
          type: string
          format: uuid
          description: >-
            Server-generated correlation identifier; caller-supplied identifiers
            are ignored.
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
            message:
              type: string
              description: Human-readable explanation without credentials.
            details:
              type: object
          required:
            - code
            - message
          additionalProperties: false
      required:
        - ok
        - requestId
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your API token. Send it on every /v1 request as `Authorization: Bearer
        <API_TOKEN>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.