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

# Async completions

> Retrieve the completion or status of a queued conversation.



## OpenAPI

````yaml get /ai/completions
openapi: 3.1.0
info:
  title: Massive
  description: The missing services for agent-first development.
  version: 1.0.0
servers:
  - url: https://render.joinmassive.com
security:
  - bearerAuth: []
paths:
  /ai/completions:
    get:
      summary: Async completions
      description: Retrieve the completion or status of a queued conversation.
      parameters:
        - name: id
          description: >-
            The identifier returned by the [AI endpoint](../ai) of the queued
            conversation to retrieve.
          schema:
            type: string
            format: uuid
            example: 1851dab8-4619-409f-893f-47dd3a180bc3
          in: query
          required: true
      responses:
        '200':
          description: The AI completion.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Completion'
            text/html:
              schema:
                type: string
        '202':
          description: The conversation status.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    description: The status of the queued conversation.
                    allOf:
                      - $ref: '#/components/schemas/Status'
                required:
                  - status
        '401':
          $ref: '#/components/responses/authenticationError'
        '403':
          $ref: '#/components/responses/authorizationError'
        '422':
          $ref: '#/components/responses/paramsError'
        '500':
          $ref: '#/components/responses/unknownError'
components:
  schemas:
    Completion:
      summary: AI completion
      type: object
      properties:
        model:
          description: The AI model that generated the completion.
          type: string
          enum:
            - chatgpt
            - gemini
            - perplexity
            - copilot
          example: chatgpt
        query:
          description: The user prompt that the completion was generated for.
          type: string
          example: best basketball shoes for 2026
        html:
          description: The rendered HTML of the entire conversation.
          type: string
          example: <!DOCTYPE html><html lang="en-US" ...
        prompt:
          description: The rendered HTML of just the prompt portion of the conversation.
          type: string
          example: '<h4 class="sr-only select-none">You said: ...'
        completion:
          description: >-
            The rendered HTML of just the completion portion of the
            conversation.
          type: string
          example: '<h4 class="sr-only select-none">ChatGPT said: ...'
        sources:
          description: The rendered HTML of just the sources portion of the conversation.
          type: string
          example: <section aria-label="Sources" ...
        ads:
          description: The rendered HTML of just the ads portion of the conversation.
          type: string
          example: >-
            <div class="border-token-border-default mt-2 border-t py-4 text-sm"
            ...
        fanouts:
          description: >-
            The fanout queries that the model searched to generate the
            completion; only some models expose these queries.
          type: array
          items:
            type: string
          example:
            - best basketball shoes 2026
            - top rated basketball shoes 2026 reviews
            - best performance basketball shoes 2026
            - best basketball shoes for guards 2026
            - best basketball shoes for wide feet 2026
            - best outdoor basketball shoes 2026
            - most popular basketball shoes 2026
        device:
          description: The name of the targeted emulated device.
          type: string
          example: null
        country:
          description: The ISO code of the targeted country.
          type: string
          example: null
        subdivision:
          description: The partial ISO code of the targeted subdivision in the country.
          type: string
          example: null
        city:
          description: The common name of the targeted city in the country.
          type: string
          example: null
        language (planned):
          description: The common name or ISO code of the targeted language.
          type: string
          example: null
        display (planned):
          description: The common name or ISO code of the targeted display language.
          type: string
          example: null
      required:
        - model
        - query
        - html
        - prompt
        - completion
        - sources
        - ads
        - fanouts
    Status:
      summary: Job status
      type: string
      enum:
        - retrieving
        - failed
      example: retrieving
  responses:
    authenticationError:
      description: The authorization header was missing.
      content:
        text/plain:
          schema:
            type: string
            example: Authorization header must be provided
    authorizationError:
      description: The API token was invalid.
      content:
        text/plain:
          schema:
            type: string
            example: Valid API token must be provided
    paramsError:
      description: One or more parameters were invalid.
      content:
        text/plain:
          schema:
            type: string
            example: Character counts must be no more than 255
    unknownError:
      description: An unknown error occurred.
      content:
        text/plain:
          schema:
            type: string
            example: Unknown error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````