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

# Anthropic Computer Use

Anthropic computer use is fully supported in Prisma AIRS AI Gateway.
For more information on the computer use tool, please refer to the [Anthropic documentation](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/computer-use-tool).

### Usage

<CodeGroup>
  ```sh cURL theme={"system"}
  curl "https://aigw.portkey.ai/v1/chat/completions" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $PORTKEY_API_KEY" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "x-portkey-strict-open-ai-compliance: false" \
    -d '{
      "model": "@anthropic/claude-4-opus-20250514",
      "anthropic_beta": "computer-use-2025-01-24",
      "max_tokens": 3000,
      "thinking": {
        "type": "enabled",
        "budget_tokens": 2030
      },
      "stream": false,
      "tools": [
          {
              "type": "computer",
              "computer": {
                  "name": "computer_20250124",
                  "display_width_px": 1024,
                  "display_height_px": 768,
                  "display_number": 1
              }
          },
          {
              "type": "str_replace_editor",
              "str_replace_editor": {
                  "name": "text_editor_20250124",
              }
          },
          {
            "type": "bash",
            "bash": {
              "name": "bash_20250124",
            }
          }
      ],
      "messages": [
          {
              "role": "user",
              "content": "Save a picture of a cat to my desktop."
          }
      ]
    }'
  ```
</CodeGroup>

# AI Gateway Features

Now that you have enterprise-grade Anthropic Computer Use setup, let's explore the comprehensive features the AI Gateway provides to ensure secure, efficient, and cost-effective AI-assisted development.

### 1. Comprehensive Metrics

Using the AI Gateway you can track 40+ key metrics including cost, token usage, response time, and performance across all your LLM providers in real time. Filter these metrics by developer, team, or project using custom metadata.

### 2. Advanced Logs

The AI Gateway's logging dashboard provides detailed logs for every request made by Anthropic Computer Use. These logs include:

* Complete request and response tracking
* Code context and generation metrics
* Developer attribution
* Cost breakdown per coding session

### 3. Unified Access to 3,000+ LLMs

Easily switch between 3,000+ LLMs for different coding tasks. Use GPT-4 for complex architecture decisions, Claude for detailed code reviews, or specialized models for specific languages - all through a single interface.

### 4. Advanced Metadata Tracking

Track coding patterns and productivity metrics with custom metadata:

* Language and framework usage
* Code generation vs completion tasks
* Time-of-day productivity patterns
* Project-specific metrics

<Card title="Custom Metadata" icon="tag" href="/docs/aigw/product/observability/metadata" />

### 5. Enterprise Access Management

<CardGroup cols={2}>
  <Card title="Budget Controls" icon="coins" href="/docs/aigw/product/model-catalog/integrations#3-budget-%26-rate-limits">
    Set and manage spending limits per developer or team. Prevent budget overruns with automatic cutoffs.
  </Card>

  <Card title="Single Sign-On (SSO)" icon="key" href="/docs/aigw/product/enterprise-offering/org-management/sso">
    Enterprise-grade SSO integration for seamless developer onboarding and offboarding.
  </Card>

  <Card title="Organisation Management" icon="building" href="/docs/aigw/product/enterprise-offering/org-management">
    Hierarchical structure with teams, projects, and role-based access control for development organisations.
  </Card>

  <Card title="Access Rules & Audit Logs" icon="shield-check" href="/docs/aigw/product/enterprise-offering/access-control-management#audit-logs">
    Comprehensive audit logging for security compliance and code generation tracking.
  </Card>
</CardGroup>

### 6. Reliability Features

<CardGroup cols={3}>
  <Card title="Fallbacks" icon="life-ring" href="/docs/aigw/product/ai-gateway/fallbacks">
    Automatically switch between models if one fails, ensuring uninterrupted coding.
  </Card>

  <Card title="Conditional Routing" icon="route" href="/docs/aigw/product/ai-gateway/conditional-routing">
    Route requests based on code complexity or language requirements.
  </Card>

  <Card title="Load Balancing" icon="balance-scale" href="/docs/aigw/product/ai-gateway/load-balancing">
    Distribute requests across multiple API keys or providers.
  </Card>

  <Card title="Caching" icon="database" href="/docs/aigw/product/ai-gateway/cache-simple-and-semantic">
    Cache common code patterns to reduce costs and improve response times.
  </Card>

  <Card title="Smart Retries" icon="refresh" href="/docs/aigw/product/ai-gateway/automatic-retries">
    Automatic retry handling for failed requests with exponential backoff.
  </Card>

  <Card title="Budget Limits" icon="shield-check" href="/docs/aigw/product/model-catalog/integrations#3-budget-%26-rate-limits">
    Enforce spending limits to control development costs.
  </Card>
</CardGroup>

### 7. Advanced Guardrails

Protect your codebase and enhance security with real-time checks on AI interactions:

* Prevent exposure of API keys and secrets
* Block generation of malicious code patterns
* Enforce coding standards and best practices
* Custom security rules for your organisation
* License compliance checks

<Card title="Guardrails" icon="shield-check" href="/docs/aigw/product/guardrails">
  Implement real-time protection for your development environment with automatic detection and filtering of sensitive code, credentials, and security vulnerabilities.
</Card>

# FAQs

<AccordionGroup>
  <Accordion title="How do I track costs per developer?">
    The AI Gateway provides several ways to track developer costs:

    * Use metadata tags to identify developers
    * Set up developer-specific API keys
    * View detailed analytics in the dashboard
  </Accordion>

  <Accordion title="What happens if a developer exceeds their budget?">
    When a developer reaches their budget limit:

    1. Further requests will be blocked
    2. The developer and admin receive notifications
    3. Coding history remains available
    4. Admins can adjust limits as needed
  </Accordion>

  <Accordion title="Can I use Anthropic Computer Use with local or self-hosted models?">
    Yes! The AI Gateway supports local models through Ollama and other self-hosted solutions. Configure your local endpoint as a custom provider in the AI Gateway and use it with Anthropic Computer Use just like any other provider.
  </Accordion>

  <Accordion title="How do I ensure code security with AI assistance?">
    The AI Gateway provides multiple security layers:

    * Guardrails to prevent sensitive data exposure
    * Request/response filtering
    * Audit logs for all interactions
    * Custom security rules
    * PII detection and masking
  </Accordion>
</AccordionGroup>

# Next Steps

**Join our Community**

* [GitHub Repository](https://github.com/Portkey-AI)

<Note>
  For enterprise support and custom features for your development teams, contact our \[enterprise team]\([https://www.paloaltonetworks.com/ai-security/ai-gateway#:\~:text=See%20Prisma%20AIRS%20AI%20Gateway%20in%20Action](https://www.paloaltonetworks.com/ai-security/ai-gateway#:~:text=See%20Prisma%20AIRS%20AI%20Gateway%20in%20Action)
</Note>


## Related topics

- [Overview](/docs/aigw/integrations/libraries.md)
- [Computer use tool](/docs/aigw/integrations/llms/anthropic/computer-use.md)
- [OpenAI](/docs/aigw/integrations/llms/openai.md)
- [Google Gemini](/docs/aigw/integrations/llms/gemini.md)
- [Google Vertex AI](/docs/aigw/integrations/llms/vertex-ai.md)
