# Anthropic Integration via LowCodeAPI
**Last Updated**: February 11, 2026
## Overview
Anthropic provides access to Claude AI models, including Claude Sonnet, Claude Haiku, and Claude Opus. The API enables you to generate text, process messages, manage files, and administer your Claude workspaces.
**Main Features:**
- Create chat messages and text completions
- Batch processing for multiple requests
- File upload and management
- Workspace and API key administration
- Token counting for cost estimation
## Base Endpoint
```
https://api.lowcodeapi.com/anthropic
```
**Important**: Always include the provider name `anthropic` in the URL path after `api.lowcodeapi.com/`
## Authentication
Anthropic uses API key authentication via the `x-api-key` header. When using LowCodeAPI, you only need your LowCodeAPI `api_token` - the system automatically maps your Anthropic API key.
**Required Credentials:**
1. **API Key** - Your Anthropic API key for accessing Claude models
**Where to get credentials:**
- Visit [Anthropic Console](https://console.anthropic.com/settings/keys) to create API keys
- Log in to your Anthropic account and navigate to Settings > API Keys
**Authentication in requests:**
LowCodeAPI automatically handles authentication by using your stored `api_key` and adding it to the `x-api-key` header.
**Required Headers:**
LowCodeAPI automatically adds the required `anthropic-version: 2023-06-01` header to all requests.
## URL Format (Important)
LowCodeAPI supports **two URL formats** for endpoints with path parameters. Always try the **New Format first**, and only fall back to the **Old Format** if it doesn't work.
### New Format (Priority) - Dynamic Path Parameters
Path parameters stay in the URL path. The provider name is always included.
```
https://api.lowcodeapi.com/anthropic/v1/models/{model_id}?api_token=YOUR_API_TOKEN
```
### Old Format (Fallback) - Sanitized Path + Query Parameters
Path parameters become query parameters. The provider name is always included.
```
https://api.lowcodeapi.com/anthropic/v1/models/modelid?modelid={model_id}&api_token=YOUR_API_TOKEN
```
### Decision Flow for AI Agents
1. Always use **New Format** first - Keep path parameters in the URL path
2. If you get a 404 or error, try **Old Format** with sanitized path
3. Log which format worked for future requests to this provider
### Multiple Path Parameters
For endpoints with multiple path parameters:
```bash
# New Format (Priority)
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}/members/{user_id}?api_token=XXX
# Old Format (Fallback)
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid/members/userid?workspace_id={workspace_id}&user_id={user_id}&api_token=XXX
```
## API Categories
- **Message** - Chat-style message creation and token counting
- **Models** - List and retrieve available Claude models
- **Completions** - Legacy text completion API
- **Message Batches** - Batch processing for multiple requests
- **Files** - File upload and management
- **Admin API** - Organization, workspace, and API key management
## Common Endpoints
### Messages
#### Create a Message
**Method:** POST | **Path:** `/v1/messages`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/messages?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/messages?api_token=YOUR_API_TOKEN
```
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Model to use: `claude-sonnet-4-5`, `claude-haiku-4-5`, `claude-opus-4-1` |
| `messages` | array | Yes | Array of message objects with `role` and `content` |
| `max_tokens` | number | Yes | Maximum tokens to generate |
| `system` | string | No | System prompt |
| `temperature` | number | No | Amount of randomness (0-1) |
| `top_p` | number | No | Nucleus sampling parameter |
| `top_k` | number | No | Sample from top K options |
| `stop_sequences` | array | No | Custom stop sequences |
| `stream` | boolean | No | Enable streaming (true/false) |
| `tools` | array | No | Tool definitions for function calling |
| `metadata` | object | No | Metadata about the request |
**Example Request:**
```bash
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/messages?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, Claude!"}
]
}'
```
**Example Response:**
```json
{
"data": {
"id": "msg_abc123",
"type": "message",
"role": "assistant",
"content": [
{"type": "text", "text": "Hello! How can I help you today?"}
],
"model": "claude-sonnet-4-5",
"stop_reason": "end_turn",
"usage": {
"input_tokens": 10,
"output_tokens": 12
}
}
}
```
#### Count Message Tokens
**Method:** POST | **Path:** `/v1/messages/count-tokens`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/messages/count-tokens?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/messages/count_tokens?api_token=YOUR_API_TOKEN
```
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Model to use |
| `messages` | array | Yes | Array of message objects |
| `system` | string | No | System prompt |
| `tools` | array | No | Tool definitions |
**Example Request:**
```bash
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/messages/count-tokens?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"messages": [
{"role": "user", "content": "Hello, Claude!"}
]
}'
```
**Example Response:**
```json
{
"data": {
"input_tokens": 10
}
}
```
### Models
#### List Models
**Method:** GET | **Path:** `/v1/models`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/models?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/models?api_token=YOUR_API_TOKEN
```
**Example Request:**
```bash
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/models?api_token=YOUR_API_TOKEN"
```
**Example Response:**
```json
{
"data": [
{
"id": "claude-sonnet-4-5",
"display_name": "Claude Sonnet 4.5",
"type": "model"
}
]
}
```
#### Get a Model
**Method:** GET | **Path:** `/v1/models/{model_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/models/{model_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/models/modelid?modelid={model_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{model_id}` | string | Yes | The model ID (e.g., `claude-sonnet-4-5`) |
**Example Request:**
```bash
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/models/claude-sonnet-4-5?api_token=YOUR_API_TOKEN"
```
### Message Batches
#### Create a Message Batch
**Method:** POST | **Path:** `/v1/message_batches`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/message_batches?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/message_batches?api_token=YOUR_API_TOKEN
```
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `endpoint` | string | Yes | The endpoint to use (e.g., `/v1/messages`) |
| `input_file_id` | string | Yes | ID of an uploaded file containing batch requests |
**Example Request:**
```bash
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/message_batches?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/v1/messages",
"input_file_id": "file_abc123"
}'
```
#### Retrieve a Message Batch
**Method:** GET | **Path:** `/v1/message_batches/{batch_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/message_batches/{batch_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/message_batches/batchid?batchid={batch_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{batch_id}` | string | Yes | The batch ID |
#### Retrieve Message Batch Results
**Method:** GET | **Path:** `/v1/message_batches/{batch_id}/results`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/message_batches/{batch_id}/results?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/message_batches/batchid/results?batchid={batch_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{batch_id}` | string | Yes | The batch ID |
#### Cancel a Message Batch
**Method:** POST | **Path:** `/v1/message_batches/{batch_id}/cancel`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/message_batches/{batch_id}/cancel?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/message_batches/batchid/cancel?batchid={batch_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{batch_id}` | string | Yes | The batch ID |
### Files
#### Create a File
**Method:** POST | **Path:** `/v1/files`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files?api_token=YOUR_API_TOKEN
```
**Request Body:** Multipart form data with file upload
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | file | Yes | The file to upload |
| `purpose` | string | No | Purpose of the file |
**Example Request:**
```bash
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/files?api_token=YOUR_API_TOKEN" \
-F "[email protected]"
```
#### List Files
**Method:** GET | **Path:** `/v1/files`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files?api_token=YOUR_API_TOKEN
```
**Query Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | number | No | Number of items to return (default: 20) |
| `after_id` | string | No | Cursor for pagination (next page) |
| `before_id` | string | No | Cursor for pagination (previous page) |
#### Get File Metadata
**Method:** GET | **Path:** `/v1/files/{file_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files/{file_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files/fileid?fileid={file_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{file_id}` | string | Yes | The file ID |
#### Download a File
**Method:** GET | **Path:** `/v1/files/{file_id}/download`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files/{file_id}/download?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files/fileid/download?fileid={file_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{file_id}` | string | Yes | The file ID |
#### Delete a File
**Method:** DELETE | **Path:** `/v1/files/{file_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files/{file_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/files/fileid?fileid={file_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{file_id}` | string | Yes | The file ID |
### Admin API - Workspaces
#### List Workspaces
**Method:** GET | **Path:** `/v1/organizations/workspaces`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces?api_token=YOUR_API_TOKEN
```
**Query Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | number | No | Number of items to return (default: 20) |
| `after_id` | string | No | Cursor for pagination (next page) |
| `before_id` | string | No | Cursor for pagination (previous page) |
#### Create Workspace
**Method:** POST | **Path:** `/v1/organizations/workspaces`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces?api_token=YOUR_API_TOKEN
```
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name for the workspace |
#### Get Workspace
**Method:** GET | **Path:** `/v1/organizations/workspaces/{workspace_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid?workspaceid={workspace_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{workspace_id}` | string | Yes | The workspace ID |
#### Update Workspace
**Method:** PATCH | **Path:** `/v1/organizations/workspaces/{workspace_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid?workspaceid={workspace_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{workspace_id}` | string | Yes | The workspace ID |
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | New name for the workspace |
#### Delete Workspace
**Method:** DELETE | **Path:** `/v1/organizations/workspaces/{workspace_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid?workspaceid={workspace_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{workspace_id}` | string | Yes | The workspace ID |
### Admin API - API Keys
#### List API Keys
**Method:** GET | **Path:** `/v1/organizations/api_keys`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys?api_token=YOUR_API_TOKEN
```
**Query Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | number | No | Number of items to return (default: 20) |
| `after_id` | string | No | Cursor for pagination |
| `before_id` | string | No | Cursor for pagination |
| `workspace_id` | string | No | Filter by Workspace ID |
| `status` | string | No | Filter by status |
| `created_by_user_id` | string | No | Filter by creator user ID |
#### Create API Key
**Method:** POST | **Path:** `/v1/organizations/api_keys`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys?api_token=YOUR_API_TOKEN
```
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name for the API key |
| `workspace_id` | string | Yes | Workspace ID to associate with |
#### Get API Key
**Method:** GET | **Path:** `/v1/organizations/api_keys/{api_key_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys/{api_key_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys/apikeyid?apikeyid={api_key_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{api_key_id}` | string | Yes | The API key ID |
#### Update API Key
**Method:** PATCH | **Path:** `/v1/organizations/api_keys/{api_key_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys/{api_key_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys/apikeyid?apikeyid={api_key_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{api_key_id}` | string | Yes | The API key ID |
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | New name for the API key |
| `status` | string | No | Status: `active` or `inactive` |
#### Delete API Key
**Method:** DELETE | **Path:** `/v1/organizations/api_keys/{api_key_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys/{api_key_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys/apikeyid?apikeyid={api_key_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{api_key_id}` | string | Yes | The API key ID |
### Admin API - Workspace Members
#### List Workspace Members
**Method:** GET | **Path:** `/v1/organizations/workspaces/{workspace_id}/members`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}/members?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid/members?workspaceid={workspace_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{workspace_id}` | string | Yes | The workspace ID |
**Query Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | number | No | Number of items to return (default: 20) |
| `after_id` | string | No | Cursor for pagination |
| `before_id` | string | No | Cursor for pagination |
#### Create Workspace Member
**Method:** POST | **Path:** `/v1/organizations/workspaces/{workspace_id}/members`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}/members?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid/members?workspaceid={workspace_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{workspace_id}` | string | Yes | The workspace ID |
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user_id` | string | Yes | User ID to add |
| `role` | string | No | Role: `admin` or `member` |
#### Get Workspace Member
**Method:** GET | **Path:** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}/members/{user_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid/members/userid?workspaceid={workspace_id}&user_id={user_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{workspace_id}` | string | Yes | The workspace ID |
| `{user_id}` | string | Yes | The user ID |
#### Update Workspace Member
**Method:** PATCH | **Path:** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}/members/{user_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid/members/userid?workspaceid={workspace_id}&user_id={user_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{workspace_id}` | string | Yes | The workspace ID |
| `{user_id}` | string | Yes | The user ID |
**Request Body:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string | No | Role: `admin` or `member` |
#### Delete Workspace Member
**Method:** DELETE | **Path:** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
**New Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/{workspace_id}/members/{user_id}?api_token=YOUR_API_TOKEN
```
**Old Format URL:**
```
https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/workspaceid/members/userid?workspaceid={workspace_id}&user_id={user_id}&api_token=YOUR_API_TOKEN
```
**Path Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `{workspace_id}` | string | Yes | The workspace ID |
| `{user_id}` | string | Yes | The user ID |
## Complete Endpoint Reference
## Response Format
All responses from LowCodeAPI are wrapped in a `data` key:
```json
{
"data": {
// Actual response from provider API
}
}
```
The `data` key contains the raw response from the provider's API.
| Method | New Format Path | Old Format Path | Description |
|--------|----------------|----------------|-------------|
| POST | `/v1/messages` | `/v1/messages` | Create a Message |
| POST | `/v1/messages/count-tokens` | `/v1/messages/count_tokens` | Count Message tokens |
| GET | `/v1/models` | `/v1/models` | List Models |
| GET | `/v1/models/{model_id}` | `/v1/models/modelid?modelid={model_id}` | Get a Model |
| POST | `/v1/completions` | `/v1/completions` | Create a Text Completion |
| POST | `/v1/message_batches` | `/v1/message_batches` | Create a Message Batch |
| GET | `/v1/message_batches` | `/v1/message_batches` | List Message Batches |
| GET | `/v1/message_batches/{batch_id}` | `/v1/message_batches/batchid?batchid={batch_id}` | Retrieve a Message Batch |
| GET | `/v1/message_batches/{batch_id}/results` | `/v1/message_batches/batchid/results?batchid={batch_id}` | Retrieve Message Batch Results |
| POST | `/v1/message_batches/{batch_id}/cancel` | `/v1/message_batches/batchid/cancel?batchid={batch_id}` | Cancel a Message Batch |
| DELETE | `/v1/message_batches/{batch_id}` | `/v1/message_batches/batchid?batchid={batch_id}` | Delete a Message Batch |
| POST | `/v1/files` | `/v1/files` | Create a File |
| GET | `/v1/files` | `/v1/files` | List Files |
| GET | `/v1/files/{file_id}` | `/v1/files/fileid?fileid={file_id}` | Get File Metadata |
| GET | `/v1/files/{file_id}/download` | `/v1/files/fileid/download?fileid={file_id}` | Download a File |
| DELETE | `/v1/files/{file_id}` | `/v1/files/fileid?fileid={file_id}` | Delete a File |
| GET | `/v1/organizations/me` | `/v1/organizations/me` | Get Current Organization |
| GET | `/v1/organizations/api_keys` | `/v1/organizations/api_keys` | List Api Keys |
| POST | `/v1/organizations/api_keys` | `/v1/organizations/api_keys` | Create Api Key |
| GET | `/v1/organizations/api_keys/{api_key_id}` | `/v1/organizations/api_keys/apikeyid?apikeyid={api_key_id}` | Get Api Key |
| PATCH | `/v1/organizations/api_keys/{api_key_id}` | `/v1/organizations/api_keys/apikeyid?apikeyid={api_key_id}` | Update Api Key |
| DELETE | `/v1/organizations/api_keys/{api_key_id}` | `/v1/organizations/api_keys/apikeyid?apikeyid={api_key_id}` | Delete Api Key |
| GET | `/v1/organizations/workspaces` | `/v1/organizations/workspaces` | List Workspaces |
| POST | `/v1/organizations/workspaces` | `/v1/organizations/workspaces` | Create Workspace |
| GET | `/v1/organizations/workspaces/{workspace_id}` | `/v1/organizations/workspaces/workspaceid?workspaceid={workspace_id}` | Get Workspace |
| PATCH | `/v1/organizations/workspaces/{workspace_id}` | `/v1/organizations/workspaces/workspaceid?workspaceid={workspace_id}` | Update Workspace |
| DELETE | `/v1/organizations/workspaces/{workspace_id}` | `/v1/organizations/workspaces/workspaceid?workspaceid={workspace_id}` | Delete Workspace |
| GET | `/v1/organizations/workspaces/{workspace_id}/members` | `/v1/organizations/workspaces/workspaceid/members?workspaceid={workspace_id}` | List Workspace Members |
| POST | `/v1/organizations/workspaces/{workspace_id}/members` | `/v1/organizations/workspaces/workspaceid/members?workspaceid={workspace_id}` | Create Workspace Member |
| GET | `/v1/organizations/workspaces/{workspace_id}/members/{user_id}` | `/v1/organizations/workspaces/workspaceid/members/userid?workspaceid={workspace_id}&user_id={user_id}` | Get Workspace Member |
| PATCH | `/v1/organizations/workspaces/{workspace_id}/members/{user_id}` | `/v1/organizations/workspaces/workspaceid/members/userid?workspaceid={workspace_id}&user_id={user_id}` | Update Workspace Member |
| DELETE | `/v1/organizations/workspaces/{workspace_id}/members/{user_id}` | `/v1/organizations/workspaces/workspaceid/members/userid?workspaceid={workspace_id}&user_id={user_id}` | Delete Workspace Member |
## API Definition Endpoints
To discover all available endpoints for Anthropic:
| Format | URL | Description |
|--------|-----|-------------|
| New Format | `https://backend.lowcodeapi.com/anthropic/openapi` | OpenAPI spec with dynamic path parameters |
| Old Format | `https://backend.lowcodeapi.com/anthropic/definition` | API definition with sanitized paths |
**Example:**
```bash
curl -X GET "https://backend.lowcodeapi.com/anthropic/openapi"
```
## Usage Examples
### Example 1: Basic Message Creation
```bash
# Step 1: Create a simple message
# No ID needed - we're creating a new conversation
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/messages?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "What is artificial intelligence?"}
]
}'
# Response includes message ID: msg_abc123
# "id": "msg_abc123"
# "content": [{"type": "text", "text": "..."}]
# Step 2: Count tokens before sending (optional)
# No ID needed - counting tokens for a hypothetical request
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/messages/count-tokens?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"messages": [
{"role": "user", "content": "What is artificial intelligence?"}
]
}'
# Step 3: Continue the conversation
# No ID needed - new request, but we can reference the previous response context
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/messages?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "What is artificial intelligence?"},
{"role": "assistant", "content": "[Previous response]"},
{"role": "user", "content": "Can you explain in simpler terms?"}
]
}'
```
### Example 2: Batch Processing Workflow
```bash
# Step 1: Upload a file with batch requests
# No ID needed - we're uploading a new file
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/files?api_token=YOUR_API_TOKEN" \
-F "file=@batch_requests.json"
# Response returns file ID: file_xyz789
# "id": "file_xyz789"
# Step 2: Create a message batch using the uploaded file
# file_xyz789 from Step 1 is the input_file_id
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/message_batches?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "/v1/messages",
"input_file_id": "file_xyz789"
}'
# Response returns batch ID: batch_def456
# "batch_id": "batch_def456"
# Step 3: Check batch status
# batch_def456 from Step 2 is the batch_id
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/message_batches/batch_def456?api_token=YOUR_API_TOKEN"
# Step 4: Get batch results when complete
# batch_def456 from Step 2 is the batch_id
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/message_batches/batch_def456/results?api_token=YOUR_API_TOKEN"
# Step 5: Delete the file when done
# file_xyz789 from Step 1 is the file_id
curl -X DELETE "https://api.lowcodeapi.com/anthropic/v1/files/file_xyz789?api_token=YOUR_API_TOKEN"
```
### Example 3: Workspace and API Key Management
```bash
# Step 1: Get current organization
# No ID needed - getting current user's organization
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/organizations/me?api_token=YOUR_API_TOKEN"
# Step 2: List all workspaces
# No ID needed - listing all workspaces
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces?api_token=YOUR_API_TOKEN"
# Step 3: Create a new workspace
# No ID needed - creating a new workspace
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Development Team"
}'
# Response returns workspace ID: ws_ghi123
# "id": "ws_ghi123"
# Step 4: Create an API key for the workspace
# ws_ghi123 from Step 3 is the workspace_id
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Dev API Key",
"workspace_id": "ws_ghi123"
}'
# Response returns API key ID: ak_jkl456
# "id": "ak_jkl456"
# Step 5: List API keys filtered by workspace
# ws_ghi123 from Step 3 is used as a filter parameter (not in URL path)
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/organizations/api_keys?api_token=YOUR_API_TOKEN&workspace_id=ws_ghi123"
# Step 6: Add a member to the workspace
# ws_ghi123 from Step 3 is the workspace_id, user_mno789 is the user_id to add
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/ws_ghi123/members?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"user_id": "user_mno789",
"role": "member"
}'
# Step 7: List workspace members
# ws_ghi123 from Step 3 is the workspace_id
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/ws_ghi123/members?api_token=YOUR_API_TOKEN"
# Step 8: Update member role
# ws_ghi123 from Step 3, user_mno789 from Step 6
curl -X PATCH "https://api.lowcodeapi.com/anthropic/v1/organizations/workspaces/ws_ghi123/members/user_mno789?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"role": "admin"
}'
```
### Example 4: File Management
```bash
# Step 1: Upload a file
# No ID needed - uploading new file
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/files?api_token=YOUR_API_TOKEN" \
-F "[email protected]"
# Response returns file ID: file_pqr321
# "id": "file_pqr321"
# Step 2: Get file metadata
# file_pqr321 from Step 1 is the file_id
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/files/file_pqr321?api_token=YOUR_API_TOKEN"
# Step 3: Download the file
# file_pqr321 from Step 1 is the file_id
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/files/file_pqr321/download?api_token=YOUR_API_TOKEN" \
-O -J
# Step 4: List all files
# No ID needed - listing all files with pagination
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/files?api_token=YOUR_API_TOKEN&limit=10"
# Step 5: Delete the file
# file_pqr321 from Step 1 is the file_id
curl -X DELETE "https://api.lowcodeapi.com/anthropic/v1/files/file_pqr321?api_token=YOUR_API_TOKEN"
```
### Example 5: Model Exploration
```bash
# Step 1: List all available models
# No ID needed - listing available models
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/models?api_token=YOUR_API_TOKEN"
# Step 2: Get details for a specific model
# claude-sonnet-4-5 is the model_id (model name, not a UUID)
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/models/claude-sonnet-4-5?api_token=YOUR_API_TOKEN"
# Step 3: Get details for another model
# claude-haiku-4-5 is the model_id
curl -X GET "https://api.lowcodeapi.com/anthropic/v1/models/claude-haiku-4-5?api_token=YOUR_API_TOKEN"
# Step 4: Use the model in a message
# No ID needed - creating new message with specified model
curl -X POST "https://api.lowcodeapi.com/anthropic/v1/messages?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
```
## Error Handling
Common HTTP status codes and their meanings:
| Status Code | Meaning |
|-------------|---------|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Check your API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Invalid endpoint or resource ID |
| 429 | Rate Limit Exceeded - Too many requests |
| 500 | Internal Server Error - Contact Anthropic support |
| 529 | Overloaded - Service temporarily unavailable |
## Best Practices
1. **Use message API** - The Messages API is the preferred interface for chat interactions
2. **Count tokens** - Use the count-tokens endpoint before large requests for cost estimation
3. **Set appropriate max_tokens** - Balance response completeness with cost
4. **Use streaming** - Enable streaming for real-time responses in interactive applications
5. **Implement retries** - Handle 429 and 529 errors with exponential backoff
6. **Cache model info** - Model list doesn't change frequently, cache responses
7. **Clean up resources** - Delete files and batches when no longer needed
8. **Use workspaces** - Organize API keys and resources by project/team
9. **Monitor usage** - Track token usage for cost management
10. **Handle errors** - Implement proper error handling and logging
## Official Documentation
- [Claude API Overview](https://platform.claude.com/docs/en/api/overview)
- [Messages API](https://platform.claude.com/docs/en/api/messages/create)
- [Models API](https://platform.claude.com/docs/en/api/models/list)
- [Message Batches](https://platform.claude.com/docs/en/api/messages/batches/create)
- [Files API](https://platform.claude.com/docs/en/api/beta/files/create)
- [Admin API](https://platform.claude.com/docs/en/api/admin/organizations/me)
- [Create API Keys](https://console.anthropic.com/settings/keys)
## Notes
- All responses from Anthropic via LowCodeAPI are wrapped in a `data` key
- The `anthropic-version: 2023-06-01` header is automatically added to all requests
- Model IDs are descriptive names (e.g., `claude-sonnet-4-5`), not UUIDs
- Pagination uses cursor-based IDs (`after_id`, `before_id`)
- Message batches require pre-uploaded files with request definitions
- Workspace and API key management is available through the Admin API