Unlock powerful real-time API control with Inline CLI – a breakthrough feature built directly into your prompt flow. This innovation enables developers to dynamically apply API configurations within user input, empowering advanced AI behavior with a single line of text.
Inline CLI allows users to inject configuration and behavior commands into the first or last 250 characters of any prompt using the syntax :command:value. These commands are parsed before the prompt is sent to the model and can be used to persist state, override models, shape responses, and control memory, search, and more.
Inline CLI works across any OpenAI-compatible API or agent. It’s powerful, portable, and frictionless for users of all levels.
Use one of the following authentication methods:
Authorization headerx-api-key headerExample headers:
Authorization: Bearer <YOUR_API_KEY>
x-api-key: <YOUR_API_KEY>
Inline CLI is controlled via the inline_cli field in the request body. You can set:
"all" — Enable all CLI features"model,search,memory""false" — Fully disables Inline CLIExample:
"inline_cli": "model,shaping,integrity"
: (colon) are extracted from the promptset commands) or temporary (for a single query):help, :getstate) bypass model processingDirect responses (no prompt processing):
| Command | Description |
|---|---|
:getstate | Show current saved CLI settings |
:help | Show all available Inline CLI commands |
Choose or override AI models:
| Command | Description |
|---|---|
:setmodel:<provider>/<model> | Persistently use specified model |
:unsetmodel | Remove saved model, revert to defaults |
:answerwith<AI> | Use a specific provider/model once (e.g. :answerwithgpt) |
Supported AI aliases: openai, gpt, claude, anthropic, grok, gemini, llama, deepseek, mistral, mixtral, smart, cheap
Customize model behavior:
| Command | Description |
|---|---|
:beprecise | Lower temperature, more accurate |
:bebalanced | Balanced configuration |
:becreative | Higher creativity, more diverse |
:becrazy | Maximum randomness |
:becoder | Optimized for code responses |
:avoidrepeat | Penalize repeated tokens |
:answerdiverse | Increase answer diversity |
:stayontopic | Focus tightly on topic |
Eliminate hallucinations and ensure accurate responses:
| Command | Description |
|---|---|
:setintegrity | Enable normal integrity setting |
:setsuperintegrity | Enable maximum integrity setting |
:answerintegrity | Use integrity override once |
:answersuperintegrity | Use super integrity override once |
:unsetintegrity | Remove persistent integrity |
Enrich prompts with real-time web search:
| Command | Description |
|---|---|
:search | Perform fast search |
:searchmore | Medium-depth search |
:deepsearch | Full-contextual search |
:setsearchlang:<lang> | Set search language (e.g. :setsearchlang:en) |
:setsearchgeo:<geo> | Set search region (e.g. :setsearchgeo:US) |
Persistent conversational memory:
| Command | Description |
|---|---|
:setmemoryon | Turn memory on |
:setmemoryoff | Turn memory off |
:clearmemory | Delete all memory for user/session |
:setmemexpire:<min> | Set memory expiration in minutes (5-1440) |
| Feature | CLI :command | JSON Field | Behavior |
|---|---|---|---|
| Persistent Setting | :setmodel:gpt/4o | model, provider | Stored in state |
| One-Time Override | :answerwithgpt | N/A | Applies once |
| View State | :getstate | N/A | No model call made |
| Persist + View | :setmodel:gpt/4o :getstate | inline_cli, user | Set & view in one call |
curl -X POST 'https://apipie.ai/v1/chat/completions' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{
"user": "12345",
"inline_cli": "all",
"messages": [
{ "role": "user", "content": "Tell me a fun fact :becreative :answerwithclaude" }
]
}'
Use the ChatCompletionRequest schema to configure:
inline_cli: "all" or comma-delimited feature listuser: Required for memory, CLI, and tenant-based featuresmodel, provider: Can be overridden by inline CLImemory, mem_session, mem_clear: Memory state and controlrag_tune, search_geo, search_lang: RAG and search customizationtools, tool_choice, tools_model: Optional function-calling supporttemperature, top_p, top_k, penalties: Prompt shaping controlsFull schema in API docs:
Chat Completions API
:set and :getstate to both configure and review settingsInline CLI gives developers and users full control over AI behavior inside the natural language prompt. With built-in support across memory, model control, search, integrity, and more, it's a one-of-a-kind system designed to maximize customization with zero overhead.
Start with :help in your prompt and build smarter agents with fewer constraints.
Minimize AI Hallucinations with Integrity
Enhance AI accuracy with our Integrity feature, reducing errors and ensuring reliable results for critical business applications. Explore its benefits today!
Global AI Operations Dashboard: Complete Model Analytics Platform
APIpie's comprehensive AI model dashboard provides real-time performance metrics, pricing analytics, and advanced filtering for optimal AI model selection across all providers.