> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costa.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Turn on Trim

When your AI runs a command, half the output is junk it doesn't need. Trim throws the junk away before it counts against your tokens. You get more out of every prompt.

<div class="tw-reset costatw:my-4 costatw:px-4 costatw:py-2 costatw:rounded-lg costatw:text-sm costatw:bg-zinc-100 costatw:text-zinc-600 costatw:dark:bg-zinc-800/50 costatw:dark:text-zinc-400">
  Trim only works on traffic flowing through Costa. If you haven't connected your tool yet, [start there](/get-started/claude-code).
</div>

<Steps>
  <Step title="Flip the switch">
    Open [Optimization Settings](https://ai.costa.app/admin/organization/optimization_settings) and toggle **Trim** on. The next request through Costa will be trimmed.

    (You can also get there from **Settings → Organization Settings → Optimization**.)
  </Step>

  <Step title="See it work">
    Ask your AI to do something — check your git status, or run the tests.

    Open [your session logs](https://ai.costa.app/code/sessions) and click the latest one. You'll see a **Trim** badge on every call that got compacted, plus exactly how many tokens it saved you.
  </Step>
</Steps>

Trim is on. From now on, every prompt goes further.

<Card title="Next: Build a Cosmic Router" icon="route" href="/get-started/cosmic-routing" horizontal>
  Mix your subscription models with frontier APIs on a per-request basis.
</Card>
