InlineCli

Inline CLI — Command Reference

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

CommandDescription
:getstateReturns the current API key state as a JSON response.
:helpReturns this command reference.

Model Commands

Switch which model handles this request, persistently or for one query

CommandDescription
:setmodel:<provider>/<model>Persistently set the model (saved to state).
:unsetmodelClear 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

CommandDescription
:beprecisetemperature=0.2, top_p=0.5
:bebalancedtemperature=0.5, top_p=0.8
:becreativetemperature=0.9, top_p=0.95
:becrazytemperature=1.5, top_p=1.0
:becodertemperature=0.1, top_p=0.4, penalties=0
:avoidrepeatfrequency_penalty=1.2
:answerdiversepresence_penalty=1.2
:stayontopicpresence_penalty=0, frequency_penalty=0

Integrity Commands

Reduce hallucinations by querying multiple times and selecting the best answer

CommandDescription
:unsetintegrityDisable integrity mode.
:setintegrityEnable integrity (best of 2) — saved to state.
:setsuperintegrityEnable super integrity (best of 3) — saved to state.
:answerintegrityEnable integrity for this query only.
:answersuperintegrityEnable super integrity for this query only.

Internet Search Commands

Augment the prompt with live web search results before sending to the LLM

CommandDescription
:searchLow-depth web search (1 query, 1 result).
:searchmoreMedium-depth web search (2 queries, 2 results each).
:deepsearchHigh-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)

CommandDescription
:setmemoryonEnable memory for this session. Saved to state.
:setmemoryoffDisable memory. Saved to state.
:clearmemoryClear all stored memory for the current session.
:setmemexpire:<minutes>Set memory TTL in minutes (5–1440). Saved to state.
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

Response

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

Changes

No recorded changes to this operation across all 1 revision of this API.