apus infer is the canonical headless surface for provider-backed inference. It exposes capability families (model, image, audio, tts, video, web, embedding), not raw gateway RPC names or agent tool ids. apus capability ... is an alias for the same command tree.

Reasons to prefer it over a one-off provider wrapper:

Command tree

 apus infer
  list
  inspect

  model
    run
    list
    inspect
    providers
    auth login
    auth logout
    auth status

  image
    generate
    edit
    describe
    describe-many
    providers

  audio
    transcribe
    providers

  tts
    convert
    voices
    providers
    personas
    status
    enable
    disable
    set-provider
    set-persona

  video
    generate
    describe
    providers

  web
    search
    fetch
    providers

  embedding
    create
    providers

infer list / infer inspect --name <capability> show this tree as data (capability id, transports, description).

Parent and subcommand help expose the full inference command tree without loading provider execution runtimes. These command definitions also supply inference shell-completion metadata.

Common tasks

Task Command Notes
Run a text/model prompt apus infer model run --prompt "..." --json Local by default
Run a model prompt on images apus infer model run --prompt "Describe this" --file ./image.png --model provider/model Repeat --file for multiple images
Generate an image apus infer image generate --prompt "..." --json Use image edit when starting from an existing file
Describe an image file or URL apus infer image describe --file ./image.png --prompt "..." --json --model must be an image-capable <provider/model>
Transcribe audio apus infer audio transcribe --file ./memo.m4a --json --model must be <provider/model>
Synthesize speech apus infer tts convert --text "..." --output ./speech.mp3 --json tts status only runs through the gateway
Generate a video apus infer video generate --prompt "..." --json Supports provider hints such as --resolution
Describe a video file apus infer video describe --file ./clip.mp4 --json --model must be <provider/model>
Search the web apus infer web search --query "..." --json
Fetch a web page apus infer web fetch --url https://example.com --json
Create embeddings apus infer embedding create --text "..." --json

Behavior

Model

Text inference and model/provider inspection.

model list, model inspect, and model providers read the selected agent's model catalog. They preserve configured model details and exclude models outside that catalog. Use infer model --agent <id> list --json or infer model --agent <id> inspect --model <provider/model> --json to select an agent. Provider counts use the same inventory.

apus infer model run --prompt "Reply with exactly: smoke-ok" --json
apus infer model run --prompt "Summarize this changelog entry" --model openai/gpt-5.4 --json
apus infer model run --prompt "Describe this image in one sentence" --file ./photo.jpg --model google/gemini-2.5-flash --json
apus infer model run --prompt "Use more reasoning here" --thinking high --json
apus infer model providers --agent <id> --json
apus infer model inspect --model gpt-6-astra --json

Use full <provider/model> refs with --local to smoke-test one provider without starting the Gateway or loading the agent tool surface:

apus infer model run --local --model anthropic/claude-sonnet-4-6 --prompt "Reply with exactly: pong" --json
apus infer model run --local --model cerebras/zai-glm-4.7 --prompt "Reply with exactly: pong" --json
apus infer model run --local --model google/gemini-2.5-flash --prompt "Reply with exactly: pong" --json
apus infer model run --local --model groq/llama-3.1-8b-instant --prompt "Reply with exactly: pong" --json
apus infer model run --local --model llmman/qwen3.8 --prompt "Reply with exactly: pong" --json
apus infer model run --local --model llmman/gemma4:e4b --prompt "Describe this image." --file ./photo.jpg --json
apus infer model run --local --model mistral/mistral-medium-3-5 --prompt "Reply with exactly: pong" --json
apus infer model run --local --model mistral/mistral-small-latest --prompt "Reply with exactly: pong" --json
apus infer model run --local --model openai/gpt-5.6-luna --prompt "Reply with exactly: pong" --json
apus infer model run --local --model ollama/qwen2.5vl:7b --prompt "Describe this image." --file ./photo.jpg --json

Notes:

Image

Generation, edit, and description.

apus infer image generate --prompt "friendly lobster illustration" --json
apus infer image generate --prompt "cinematic product photo of headphones" --json
apus infer image generate --model openai/gpt-image-1.5 --output-format png --background transparent --prompt "simple red circle sticker on a transparent background" --json
apus infer image generate --model openai/gpt-image-2 --quality low --openai-moderation low --prompt "low-cost draft poster" --json
apus infer image generate --prompt "slow image backend" --timeout-ms 180000 --json
apus infer image edit --file ./logo.png --model openai/gpt-image-1.5 --output-format png --background transparent --prompt "keep the logo, remove the background" --json
apus infer image edit --file ./poster.png --prompt "make this a vertical story ad" --size 2160x3840 --aspect-ratio 9:16 --resolution 4K --json
apus infer image describe --file ./photo.jpg --json
apus infer image describe --file https://example.com/photo.png --json
apus infer image describe --file ./receipt.jpg --prompt "Extract the merchant, date, and total" --json
apus infer image describe-many --file ./before.png --file ./after.png --prompt "Compare the screenshots and list visible UI changes" --json
apus infer image describe --file ./ui-screenshot.png --model openai/gpt-5.4-mini --json
apus infer image describe --file ./photo.jpg --model ollama/qwen2.5vl:7b --prompt "Describe the image in one sentence" --timeout-ms 300000 --json

Notes:

Audio

File transcription (not realtime session management).

apus infer audio transcribe --file ./memo.m4a --json
apus infer audio transcribe --agent <id> --file ./memo.m4a --json
apus infer audio transcribe --file ./team-sync.m4a --language en --prompt "Focus on names and action items" --json
apus infer audio transcribe --file ./memo.m4a --model openai/whisper-1 --json

--model must be <provider/model>.

For CLI-backed transcription, the result's provider identifies the tool family and model reports the executed command. Auto-detected tools report their resolved executable path; explicit CLI entries retain their authored command value. This field does not identify the speech model loaded internally by the tool.

TTS

Speech synthesis and TTS provider/persona state.

apus infer tts convert --text "hello from apus" --output ./hello.mp3 --json
apus infer tts convert --text "Your build is complete" --output ./build-complete.mp3 --json
apus infer tts convert --provider xiaomi --text "Provider-only selection" --output ./xiaomi.mp3 --json
apus infer tts providers --json
apus infer tts personas --json
apus infer tts status --json

Notes:

Video

Generation and description.

apus infer video generate --prompt "cinematic sunset over the ocean" --json
apus infer video generate --prompt "slow drone shot over a forest lake" --resolution 768P --duration 6 --json
apus infer video describe --file ./clip.mp4 --json
apus infer video describe --agent <id> --file ./clip.mp4 --json
apus infer video describe --file ./clip.mp4 --model openai/gpt-5.4-mini --json

Notes:

Web

Search and fetch.

apus infer web search --query "Apus docs" --json
apus infer web search --query "Apus infer web providers" --json
apus infer web fetch --url https://ami-docs.dev.apuscorp.com/cli/infer --json
apus infer web providers --agent <id> --json

web providers lists available, configured, and selected providers for search and fetch.

Embedding

Vector creation and embedding-provider inspection.

apus infer embedding create --text "friendly lobster" --json
apus infer embedding create --text "customer support ticket: delayed shipment" --model openai/text-embedding-3-large --json
apus infer embedding providers --agent <id> --json

Without --json, embedding create shows the provider and model, followed by each input, its dimension count, and a preview of the first eight vector values. Longer vectors end with ...; use --json to retrieve complete vectors.

JSON output

Infer commands normalize JSON output under a shared envelope:

{
  "ok": true,
  "capability": "image.generate",
  "transport": "local",
  "provider": "openai",
  "model": "gpt-image-2",
  "attempts": [],
  "outputs": []
}

Stable top-level fields:

For generated media commands, outputs contains files written by Apus. Use the path, mimeType, size, and any media-specific dimensions in that array for automation instead of parsing human-readable stdout.

Common pitfalls

# Bad
apus infer media image generate --prompt "friendly lobster"

# Good
apus infer image generate --prompt "friendly lobster"
# Bad
apus infer audio transcribe --file ./memo.m4a --model whisper-1 --json

# Good
apus infer audio transcribe --file ./memo.m4a --model openai/whisper-1 --json

Turn infer into a skill

Copy and paste this to an agent:

Read https://ami-docs.dev.apuscorp.com/cli/infer, then create a skill that routes my common workflows to `apus infer`.
Focus on model runs, image generation, video generation, audio transcription, TTS, web search, and embeddings.

A good infer-based skill maps common user intents to the right subcommand, includes a few canonical examples per workflow, prefers apus infer ... over lower-level alternatives, and does not re-document the entire infer surface in the skill body.

Related