---
title: "Completion"
method: GET
path: "/ai"
---

# Completion

`GET /ai`

Retrieve an LLM completion or queue a conversation for later retrieval.

## Query parameters

- `id` string, uuid
- `prompt` string
- `model` 'chatgpt' | 'gemini' | 'perplexity'
- `device` string
- `country` string
- `subdivision` string
- `city` string
- `language` string
- `display` string
- `format` 'json' | 'rendered' | 'raw (planned)'
- `expiration` integer
- `mode` 'sync' | 'async'
- `callback` string

## Response `200`

The AI completion.

- Completion
  - `model` 'chatgpt' | 'gemini' | 'perplexity', required — The AI model that generated the completion.
  - `query` string, required — The user prompt that the completion was generated for.
  - `html` string, required — The rendered HTML of the entire conversation.
  - `prompt` string, required — The rendered HTML of just the prompt portion of the conversation.
  - `completion` string, required — The rendered HTML of just the completion portion of the conversation.
  - `sources` string, required — The rendered HTML of just the sources portion of the conversation.
  - `ads` string, required — The rendered HTML of just the ads portion of the conversation.
  - `sse` string, required — [ChatGPT only] The server-sent events JSON that was used to populate the conversation HTML.
  - `fanouts` string[], required — [ChatGPT only] The fanout queries that the model searched to generate the completion; only some models expose these queries.
  - `device` string — The name of the targeted emulated device.
  - `country` string — The ISO code of the targeted country.
  - `subdivision` string — The partial ISO code of the targeted subdivision in the country.
  - `city` string — The common name of the targeted city in the country.
  - `language` string — [Planned] The common name or ISO code of the targeted language.
  - `display` string — [Planned] The common name or ISO code of the targeted display language.

## Other responses

- `202` — A job identifier or the conversation status.
- `401` — The authorization header was missing.
- `402` — No more credits are available.
- `403` — The content was captcha’d.
- `422` — One or more parameters were invalid.
- `500` — An unknown error occurred.
- `503` — The service is unavailable.
- `504` — The operation timed out.

## Changes

> 9 revisions in range; 1 could not be searched.

- **2026-07-06** `bfddf5b2c698` — 4 breaking, 7 warning, 10 info
  - removed the enum value `raw` from the `query` request parameter `format`
  - added `subschema #1, subschema #2` to the response body `oneOf` list for the response status `202`
  - the response's body type/format changed from `object`/`` to ``/`` for status `202`
  - removed the required property `id` from the response with the `202` status
  - …17 more
- **2026-06-29** `bbfea328162f` — 1 breaking, 2 info
  - removed the required property `fanouts` from the response with the `200` status
  - added the optional property `fanouts (ChatGPT only)` to the response with the `200` status
  - added the optional property `sse (ChatGPT only)` to the response with the `200` status
- **2026-05-11** `b27e3b3c12b6` — 1 breaking, 2 info
  - removed the required property `subqueries` from the response with the `200` status
  - added the required property `ads` to the response with the `200` status
  - added the required property `fanouts` to the response with the `200` status

[Change history](https://skmtc.dev/joinmassive/apis/massive/changes/ai/get.md)

---

[API](https://skmtc.dev/joinmassive/apis/massive.md) · [All operations](https://skmtc.dev/joinmassive/apis/massive/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/joinmassive/massive/revisions/3a9f7769563f/schema)
