---
title: "Inline CLI — Command Reference"
method: GET
path: "/v1/chat/completions/inline-cli"
tags: ["InlineCli"]
---

# Inline CLI — Command Reference

`GET /v1/chat/completions/inline-cli`

## Request

- Base URL: `https://apipie.ai`
- URL: `https://apipie.ai/v1/chat/completions/inline-cli`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

The Inline CLI lets you embed `:command` tokens directly inside your chat prompt to dynamically
control API settings — model selection, internet search, memory, response shaping, and integrity —
all without any extra API calls.

**How to enable:** include `inline_cli: "all"` (or a comma-separated list of feature groups) in
your `/v1/chat/completions` request body. Then embed `:command` tokens anywhere in your prompt text.
Commands are parsed before the LLM call and applied to the request.

**Feature groups:** `model`, `shaping`, `integrity`, `internet`, `memory`, `information`

**State integration:** Commands that include `set` (e.g. `:setmodel`, `:setmemoryon`,
`:setsearchlang`) automatically persist their changes to the API key state via the State API,
so subsequent requests inherit the updated configuration without re-sending the command.

**NLP mode:** When NLP is enabled in state, the LLM itself can interpret natural language
instructions and emit the appropriate `:command` tokens, enabling fully conversational control
of API settings by your agent.

---

### Information Commands
> Direct commands — the prompt is **not** forwarded to the LLM

| Command | Description |
|---------|-------------|
| `:getstate` | Returns the current API key state as a JSON response. |
| `:help` | Returns this command reference. |

---

### Model Commands
> Switch which model handles this request, persistently or for one query

| Command | Description |
|---------|-------------|
| `:setmodel:<provider>/<model>` | Persistently set the model (saved to state). |
| `:unsetmodel` | Clear the persistent model override. |
| `:answerwith<name>` | Use a named model for this query only. Options: `openai`, `gpt`, `anthropic`, `claude`, `grok`, `llama`, `gemini`, `deepseek`, `mistral`, `mixtral`, `smart`, `cheap`, `coding`. |

---

### Shaping Commands
> Adjust temperature, top_p, and penalty settings

| Command | Description |
|---------|-------------|
| `:beprecise` | temperature=0.2, top_p=0.5 |
| `:bebalanced` | temperature=0.5, top_p=0.8 |
| `:becreative` | temperature=0.9, top_p=0.95 |
| `:becrazy` | temperature=1.5, top_p=1.0 |
| `:becoder` | temperature=0.1, top_p=0.4, penalties=0 |
| `:avoidrepeat` | frequency_penalty=1.2 |
| `:answerdiverse` | presence_penalty=1.2 |
| `:stayontopic` | presence_penalty=0, frequency_penalty=0 |

---

### Integrity Commands
> Reduce hallucinations by querying multiple times and selecting the best answer

| Command | Description |
|---------|-------------|
| `:unsetintegrity` | Disable integrity mode. |
| `:setintegrity` | Enable integrity (best of 2) — saved to state. |
| `:setsuperintegrity` | Enable super integrity (best of 3) — saved to state. |
| `:answerintegrity` | Enable integrity for this query only. |
| `:answersuperintegrity` | Enable super integrity for this query only. |

---

### Internet Search Commands
> Augment the prompt with live web search results before sending to the LLM

| Command | Description |
|---------|-------------|
| `:search` | Low-depth web search (1 query, 1 result). |
| `:searchmore` | Medium-depth web search (2 queries, 2 results each). |
| `:deepsearch` | High-depth web search (4 queries, 2 results each). |
| `:setsearchlang:<code>` | Set search language (2-letter ISO code, e.g. `en`). Saved to state. |
| `:setsearchgeo:<code>` | Set search geography (2-letter country code, e.g. `US`). Saved to state. |

---

### Memory Commands
> Control conversation memory (stored in vector DB, keyed by session)

| Command | Description |
|---------|-------------|
| `:setmemoryon` | Enable memory for this session. Saved to state. |
| `:setmemoryoff` | Disable memory. Saved to state. |
| `:clearmemory` | Clear all stored memory for the current session. |
| `:setmemexpire:<minutes>` | Set memory TTL in minutes (5–1440). Saved to state. |

## Response `200`

This path is documentation-only. Use POST /v1/chat/completions with inline_cli enabled.

---

[API](https://skmtc.dev/apipie/apis/introduction.md) · [All operations](https://skmtc.dev/apipie/apis/introduction/llms.txt) · [OpenAPI document](https://skmtc.dev/apipie/apis/introduction/revisions/f8386be4eb3f?raw)
