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

# Poll a claim ceremony (claim grant)

> Polls the claim ceremony with `grant_type=urn:workos:agent-auth:grant-type:claim`.
Authenticate with the account API key (bearer, or the `claim_token` form field).
Returns `authorization_pending` until the human finishes, `expired_token` if the
code window closed, `access_denied` if the account was already claimed by someone
else, or a `claimed` success once bound. A human who already has an account gets
the agent account merged into it (balance and keys carry over), not a denial.
The API key keeps working after a successful claim.




## OpenAPI

````yaml /openapi.yaml post /oauth2/token
openapi: 3.1.0
info:
  title: Impossibl AI API
  version: 0.0.1
  description: >
    The Impossibl AI API is one API for all AI providers, OpenAI-compatible
    across OpenAI,

    Anthropic, Google, xAI, and more (`GET /v1/models` lists the full catalog),

    billed from a prepaid credit balance.


    Provider usage is billed at provider list prices with no usage markup.

    Prepaid credit purchases charge a separate fixed 5% platform fee before tax.


    **Agent quickstart**

    1. `POST /v1/accounts` — create a funded account; you get an API key and a
       signup-bonus balance in one call (no human step required).
    2. Call `POST /v1/chat/completions`, `POST /v1/responses`, or
       `POST /v1/audio/transcriptions` with
       `Authorization: Bearer <key>` and a `provider/model` id from `GET /v1/models`.
    3. Credits are deducted per request by token or audio-duration usage; check
    `GET /v1/account`.
servers:
  - url: https://api.impossibl.com
    description: Production
  - url: http://localhost:8787
    description: Local dev
security:
  - BearerKey: []
paths:
  /oauth2/token:
    post:
      summary: Poll a claim ceremony (claim grant)
      description: >
        Polls the claim ceremony with
        `grant_type=urn:workos:agent-auth:grant-type:claim`.

        Authenticate with the account API key (bearer, or the `claim_token` form
        field).

        Returns `authorization_pending` until the human finishes,
        `expired_token` if the

        code window closed, `access_denied` if the account was already claimed
        by someone

        else, or a `claimed` success once bound. A human who already has an
        account gets

        the agent account merged into it (balance and keys carry over), not a
        denial.

        The API key keeps working after a successful claim.
      operationId: pollAccountClaim
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - grant_type
              properties:
                grant_type:
                  type: string
                  example: urn:workos:agent-auth:grant-type:claim
                claim_token:
                  type: string
                  description: The account API key
                  if not sent as a bearer token.: null
      responses:
        '200':
          description: Account claimed
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: claimed
                  account:
                    type: object
                    properties:
                      id:
                        type: string
                      email:
                        type: string
                        nullable: true
        '400':
          description: >-
            Pending or terminal ceremony state: `authorization_pending`,
            `expired_token`, `access_denied`, or `unsupported_grant_type`.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Invalid API key
              type: authentication_error
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              description: >-
                One of authentication_error, invalid_request_error,
                insufficient_quota, upstream_error, provider_not_configured.
  securitySchemes:
    BearerKey:
      type: http
      scheme: bearer
      description: Gateway API key (`imp-rt-...`) from POST /v1/accounts or /v1/keys.

````