> ## 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

> [!NOTE]
>
> Screenshots on this page show the previous product branding and navigation. The workflow they
> illustrate is current; the interface around it has since been rebranded to Prisma AIRS.

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

```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."
        }
    ]
  }'
```

# AI Gateway Features

Now that you have Anthropic Computer Use set up, let's explore the 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.

![](https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/integrations/observability.png?fit=max\&auto=format\&n=T0lFtdapIPX8YtCI\&q=85\&s=2ae78f4fa0c682ce65125ce6bc0d0d55)

### 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

> **[Custom Metadata](https://docs.portkey.ai/docs/aigw/product/observability/metadata.md)**

### 5. Access Management

> **[Budget Controls](https://docs.portkey.ai/docs/aigw/product/model-catalog/integrations.md#3-budget-%26-rate-limits)**
>
> Set and manage spending limits per developer or team. Prevent budget overruns with automatic cutoffs.

> **[Single Sign-On (SSO)](https://docs.portkey.ai/docs/aigw/product/enterprise-offering/org-management/sso.md)**
>
> SSO integration for seamless developer onboarding and offboarding.

> **[Organisation Management](https://docs.portkey.ai/docs/aigw/product/enterprise-offering/org-management.md)**
>
> Hierarchical structure with teams, projects, and role-based access control for development organisations.

> **[Access Rules & Audit Logs](https://docs.portkey.ai/docs/aigw/product/enterprise-offering/access-control-management.md#audit-logs)**
>
> Comprehensive audit logging for security compliance and code generation tracking.

### 6. Reliability Features

> **[Fallbacks](https://docs.portkey.ai/docs/aigw/product/ai-gateway/fallbacks.md)**
>
> Automatically switch between models if one fails, ensuring uninterrupted coding.

> **[Conditional Routing](https://docs.portkey.ai/docs/aigw/product/ai-gateway/conditional-routing.md)**
>
> Route requests based on code complexity or language requirements.

> **[Load Balancing](https://docs.portkey.ai/docs/aigw/product/ai-gateway/load-balancing.md)**
>
> Distribute requests across multiple API keys or providers.

> **[Caching](https://docs.portkey.ai/docs/aigw/product/ai-gateway/cache-simple-and-semantic.md)**
>
> Cache common code patterns to reduce costs and improve response times.

> **[Smart Retries](https://docs.portkey.ai/docs/aigw/product/ai-gateway/automatic-retries.md)**
>
> Automatic retry handling for failed requests with exponential backoff.

> **[Budget Limits](https://docs.portkey.ai/docs/aigw/product/model-catalog/integrations.md#3-budget-%26-rate-limits)**
>
> Enforce spending limits to control development costs.

### 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

> **[Guardrails](https://docs.portkey.ai/docs/aigw/product/guardrails.md)**
>
> Implement real-time protection for your development environment with automatic detection and filtering of sensitive code, credentials, and security vulnerabilities.

# FAQs

> **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

> **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

> **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.

> **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

# Next Steps

**Join our Community**

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


## Related topics

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.