---
title: "POST /api/kernel/code_autocomplete"
method: POST
path: "/api/kernel/code_autocomplete"
---

# POST /api/kernel/code_autocomplete

`POST /api/kernel/code_autocomplete`

## Headers

- `Marimo-Session-Id` string, required

## Request body

- CodeCompletionRequest
  - `cellId` string, cell-id, required
  - `document` string, required
  - `id` string, request-id, required

## Response `200`

Complete a code fragment

- SuccessResponse
  - `success` boolean

## Changes

- **2026-03-31** `41bba414df27` — 2 breaking
  - the `cellId` request property type/format changed from `string`/`` to `string`/`cell-id`
  - the `id` request property type/format changed from `string`/`` to `string`/`request-id`
- **2026-03-18** `f29fa637d35b` — 2 info
  - the `cellId` request property type/format was generalized from `string`/`cell-id` to `string`/``
  - the `id` request property type/format was generalized from `string`/`request-id` to `string`/``

[Change history](https://skmtc.dev/marimo-team/apis/marimo-api/changes/api/kernel/code_autocomplete/post.md)

---

[API](https://skmtc.dev/marimo-team/apis/marimo-api.md) · [All operations](https://skmtc.dev/marimo-team/apis/marimo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/marimo-team/marimo-api/revisions/a39082aac3ce/schema)
