/v1 base URL and the Anthropic client with the API root, then call the protocol-native endpoint each SDK expects.
Personal Premium costs USD 8 per month and includes 5 million charged API tokens plus unlimited browser chat across the supported Premium model set. The same membership can power an application through these SDKs, a coding agent through a maintained integration, and everyday work in the browser.
This guide builds the same two-request check in both languages. Each example sends an OpenAI Responses request and an Anthropic Messages request.
Choose the request path
Use Responses for Responses-native OpenAI applications. Use Chat Completions when an existing OpenAI-compatible application expects that contract. Use Messages for Claude-native code.
Before you start
You need active Premium or eligible Team access, a Capriole AI API key, and either Python or Node.js 20 or later. Copy a newly created key when Capriole shows it; the full secret is not shown again.1
Create an environment and install both SDKs
Create and activate a virtual environment on macOS or Linux, then install the official packages:On Windows PowerShell, activate the same environment with:Keep the environment active for the remaining steps. The install command should finish with both packages available and no dependency error.
2
Set the Capriole API key
3
Create the SDK example
Save this file as
capriole_sdk_example.py:auth_token is intentional. It makes the Anthropic SDK send the Capriole API key as a Bearer token.4
Run the program
Run the same check with TypeScript
Use Node.js 20 or later. Install the official SDKs and a TypeScript runner in a new project:capriole-sdk-example.ts:
baseURL, while the Python constructors use base_url. The Anthropic examples use authToken or auth_token so the SDK sends Bearer authentication to Capriole.
Use Chat Completions when your app expects it
The same OpenAI client can call the Chat Completions-compatible endpoint:google-latest to responses.create(). The Responses route accepts the supported OpenAI Responses model set, while Chat Completions accepts the broader public compatible catalog.
Fix common SDK errors
Understand the result boundary
Capriole preserves the protocol requested by the SDK. Responses output remains Responses output, and Anthropic Messages output remains Messages output. One account and balance sit behind both routes; the response schemas do not become interchangeable. The multi-protocol API article explains that architecture. Use the Responses reference, Chat Completions reference, or Messages reference for endpoint fields. The API quickstart remains the shortest route to a raw first request. Read how Capriole tests multi-model API compatibility for the evidence required before a protocol, alias, or client path is documented as supported. API calls are metered in charged tokens. Read how charged tokens are calculated before estimating a workload.Official SDK references
- OpenAI: Python SDK
- Anthropic: Python SDK
- OpenAI: TypeScript and JavaScript SDK
- Anthropic: TypeScript SDK