# The app's own AI calls

Investigation · Risks you can't see yet · X08

Audits every runtime AI model call inside your app for prompt-injection traps, runaway costs, retired models, missing output checks, and silent slowdowns.

**Use it when:** Your app calls an LLM or AI API while users interact with it (distinct from using AI to write code).

## Prompt

```text
Audit every place this application calls an AI model at runtime. For each call check: (1) model ID and whether it is deprecated or nearing retirement, (2) what untrusted input enters the prompt (user text, scraped pages, uploaded files, emails) and its prompt-injection exposure, (3) what the model's output can trigger (display text, tool calls, database writes, emails, charges), (4) timeouts, retries, and fallback behavior when the provider is slow or down, (5) schema/length/allowlist validation on outputs before use, (6) cost per call and calls triggered per user action, (7) whether personal user data is sent to the model provider, and (8) whether any eval or test detects answer quality dropping. Rank findings by severity: unauthorized actions first, cost blowups second, silent quality degradation third.

Treat this as a read-only investigation. Do not edit code, data, configuration, credentials or infrastructure. Report each finding with file:line or a command I can rerun, and a confidence.
Give me: Every runtime model call (file:line) with model ID, untrusted inputs, downstream actions triggered by output, timeout/fallback, output validation, estimated calls per action, and ranked risks.
Watch for: Do not stop at reading the prompt string. Trace where the model's response actually flows and what actions it can execute.
If this describes the project, say so and stop instead: An application that makes zero AI API calls at runtime.
Start your report in plain English: what you found, what it means, and whether I need to do anything. Put files, lines and commands underneath.
```

**What it returns:** Every runtime model call (file:line) with model ID, untrusted inputs, downstream actions triggered by output, timeout/fallback, output validation, estimated calls per action, and ranked risks.

**Skip it when:** An application that makes zero AI API calls at runtime.

**Tools:** Repository access.

**Watch for:** Do not stop at reading the prompt string. Trace where the model's response actually flows and what actions it can execute.

**Changes:** Changes nothing

Source: https://www.atlasscope.dev/prompts/the-apps-own-ai-calls
