Skip to content

Onboarding Anthropic's Claude

This guide explains how to integrate WSO2 API Manager with Claude, allowing you to access Claude's APIs via API Manager's AI Gateway. It provides step-by-step instructions for configuring Claude as a custom AI vendor to effectively manage and track AI API interactions.

  1. Login to the Admin Portal
  2. Navigate to the AI/LLM Vendors section and click on Add AI/LLM Vendor.

  3. Fill in the general details for the AI vendor as shown below.

    Field Sample value
    Name Anthropic Claude
    API Version 1.0.0
    Description Anthropic Claude LLM Service

  4. Enter the LLM configurations as outlined below.

    Attribute Name Input Source Attribute Identifier
    Request Model payload $.model
    Response Model payload $.model
    Prompt Token Count payload $.usage.input_tokens
    Completion Token Count payload $.usage.output_tokens
    Total Token Count payload N/A
    Remaining Token Count header anthropic-ratelimit-tokens-remaining

    Refer the image below for the LLM configuration.

  5. Download the API definition for Anthropic Claude from Anthropic Claude API Definition and upload it as the API Definition.

  6. Configure the authentication configurations by setting the type to authHeader and the identifier to x-api-key.

  7. Choose the connector type as default.

  8. Next, you can add any models you prefer. For instance, add claude-3-5-sonnet-20241022 and press enter. You can always add more models later. This enables you to set up model-based load balancing and failover using Claude's APIs.

  9. Finally, click Add to integrate Anthropic Claude as an AI Vendor.

Once added, you'll be able to create and manage AI APIs for Anthropic Claude, allowing you to leverage its capabilities within your applications.