Create messages, list models, and count tokens via Anthropic API for AI orchestration
200+ deploysYour AI agent gets 5 capabilities in one connection. Deploy once, use from any client.
POST endpoints
create_message
Send a prompt to Claude. Required: 'model', 'max_tokens', 'messages' array [{role, content}]. Optional: 'system' (string or content blocks), 'temperature' (0-1), 'tools' for tool use, 'stream' (true for SSE). Returns content blocks (text/tool_use), stop_reason, and usage (input/output tokens).
https://api.anthropic.com/v1/messages
count_tokens
Count input tokens before sending. Pass same 'model' and 'messages' you would to create_message. Returns 'input_tokens' count. Use to verify prompts fit in context window, estimate cost (tokens * per-token price), or split large inputs across multiple calls.
https://api.anthropic.com/v1/messages/count_tokens
create_batch
Create async batch for bulk processing. Pass 'requests' array of {custom_id, params} where params matches create_message schema. Returns batch ID for polling status. Results available within 24h. 50% cheaper than real-time. Max 100K requests per batch.
https://api.anthropic.com/v1/messages/batches
GET endpoints
list_models
List available Claude models. Returns ID (e.g. claude-opus-4-6-20250514), display_name, created_at, and type. Filter by checking model IDs for family (opus/sonnet/haiku). Paginate with 'before_id' and 'limit' (max 100).
https://api.anthropic.com/v1/models
get_model
Get model details by ID. Returns display_name, created_at, type, max input/output token limits. Use to verify a model ID is valid before calling create_message, or to check context window capacity for long prompts.
https://api.anthropic.com/v1/models/{model_id}
Connect Anthropic API to Claude Code with one command:
claude mcp add anthropic https://datafaucet.dev/api/mcp/t/anthropic{notion_token}) with your real credentialsNeed API keys? Try our free sandbox templates first to see MCP in action with zero setup.
Replace these placeholders with your real values before deploying:
{anthropic_api_key}API settings page{batch_id}Resource identifier{model_id}Resource identifier{prompt}Your valuePreview:
POST https://api.anthropic.com/v1/messages x-api-key: {anthropic_api_key} anthropic-version: 2023-06-01 Content-Type: application/json {"model":"claude-sonnet-4-6-20250514","max_tokens":1024,"messages":[{"role":"user","content":"{prompt}"}]}
claude mcp add anthropic --url https://datafaucet.dev/api/mcp/t/anthropic
Paste into your client's MCP configuration file · most users connect in under 60s
claude mcp add anthropic --url https://datafaucet.dev/api/mcp/t/anthropicWhat your AI agent sees
I have access to 5 tools from Anthropic API: create_message, list_models, get_model, and 2 more.
“Send a prompt to Claude. Required: 'model', 'max_tokens', 'messages' array [{role, content}]. Optional: 'system' (string or content blocks), 'temperature' (0-1), 'tools' for tool use, 'stream' (true for SSE). Returns content blocks (text/tool_use), stop_reason, and usage (input/output tokens).”
Calling create_message... Done. Here are the results.
Try these prompts
“Send a prompt to Claude. Required: 'model', 'max_tokens', 'messages' array [{role, content}]. Optional: 'system' (string or content blocks), 'temperature' (0-1), 'tools' for tool use, 'stream' (true for SSE). Returns content blocks (text/tool_use), stop_reason, and usage (input/output tokens)”
Copy“List available Claude models. Returns ID (e.g. claude-opus-4-6-20250514), display_name, created_at, and type. Filter by checking model IDs for family (opus/sonnet/haiku). Paginate with 'before_id' and 'limit' (max 100)”
Copy“Get model details by ID. Returns display_name, created_at, type, max input/output token limits. Use to verify a model ID is valid before calling create_message, or to check context window capacity for long prompts”
CopyClick any prompt to copy, then paste into your AI client.