---
title: "Suggest a continuation of unfinished text"
method: POST
path: "/api/autocomplete"
---

# Suggest a continuation of unfinished text

`POST /api/autocomplete`

## Request

- Base URL: `https://www.toma.com`
- URL: `https://www.toma.com/api/autocomplete`
- Auth: none declared

Returns a suffix without saving or submitting text. Uses required zero-data-retention AI Gateway routing. Public, limited to 60 requests per member or anonymous IP per minute; authenticated REST and MCP share the member budget. Send only the active field, never credentials. Browser requests must use same-origin JSON.

## Request body

- object
  - `text` string, required
  - `field` string, required
  - `kind` 'text' | 'search' | 'url' | 'multiline', required
  - `limit` integer, required

## Response `200`

A suggested suffix, or an empty completion.

- object
  - `completion` string, required

## Other responses

- `400`: Invalid completion input.
- `401`: An explicitly supplied API key is invalid.
- `403`: Cross-site request refused.
- `415`: Send a JSON body with Content-Type: application/json.
- `429`: Too many completion requests; Retry-After gives the wait in seconds.
- `503`: Text completion is temporarily unavailable.

---

[API](https://skmtc.dev/toma/apis/toma-api.md) - [All operations](https://skmtc.dev/toma/apis/toma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/toma/apis/toma-api/revisions/b4e56e1db5a2?raw)
