---
title: "Create Claude messages using CLI"
method: POST
path: "/v1/claude/messages"
tags: ["claude"]
---

# Create Claude messages using CLI

`POST /v1/claude/messages`

Creates a completion using the claude CLI tool as a subprocess, supporting both streaming and non-streaming responses, with resume functionality

## Request body

- GithubComVanpeltCatnipInternalModelsCreateCompletionRequest — Request payload for Claude Code completion using claude CLI subprocess
  - `disable_tools` boolean — Whether to disable all tools (Claude will only use context, no tool calls)
  - `fork` boolean — Whether to fork the session instead of resuming (doesn't pollute original session history) Defaults to true when resuming unless explicitly set to false
  - `max_turns` integer — Maximum number of turns in the conversation
  - `model` string — Optional model override
  - `prompt` string — The prompt/message to send to claude
  - `resume` boolean — Whether to resume the most recent session for this working directory
  - `stream` boolean — Whether to stream the response
  - `suppress_events` boolean — Whether to suppress stop events for this automated operation
  - `system_prompt` string — Optional system prompt override
  - `working_directory` string — Working directory for the claude command

## Response `200`

OK

- GithubComVanpeltCatnipInternalModelsCreateCompletionResponse — Response from Claude Code completion using claude CLI subprocess
  - `error` string — Any error that occurred
  - `is_chunk` boolean — Whether this is a streaming chunk or complete response
  - `is_last` boolean — Whether this is the last chunk in a stream
  - `response` string — The generated response text

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/wandb/apis/catnip-container-api.md) · [All operations](https://skmtc.net/wandb/apis/catnip-container-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wandb/catnip-container-api/revisions/a075b0fa501a/schema)
