# Claude Sonnet 4.5 - Core.Today AI API > Anthropic's most intelligent and capable Sonnet model. Best-in-class for complex reasoning, nuanced understanding, and coding tasks with exceptional instruction following. - **Provider**: Anthropic - **Model ID**: claude-sonnet-4-5 - **Category**: LLM - **Credits**: 4 per 1K tokens (avg) - **Speed**: Fast - **Quality**: Ultra ## Model Specifications - **Context Window**: 200K tokens - **Max Output**: 16K tokens - **Training Cutoff**: 2025-04 - **Supported Formats**: text, markdown, xml - **Compatible SDK**: Anthropic ### Capabilities - Vision (image input) - Function Calling - Streaming - System Prompt ### Token Pricing (per 1M tokens) - **Input Tokens**: 5,574 credits ($3.72) - **Output Tokens**: 27,870 credits ($18.58) - **Cached Tokens**: 557.4 credits ($0.37) ## Features - 200K context window - 16K max output tokens - Vision capabilities - Computer use - Superior code generation - Exceptional instruction following ## Use Cases - Complex document analysis - Code generation and review - Research and analysis - Technical writing - Agentic workflows - Data extraction ## API Endpoint Base URL: https://api.core.today Endpoint: POST /llm/anthropic/v1/messages ## Authentication Header: Authorization: Bearer YOUR_API_KEY Note: LLM endpoints use OpenAI-compatible format with Authorization Bearer token. ## Input Parameters ### Required - **messages**: array - Array of message objects with role and content - **model**: string (default: claude-sonnet-4-5) - Model identifier - **max_tokens**: integer - Maximum tokens in response (required, up to 16384) ### Optional - **system**: string - System prompt for setting behavior - **temperature**: float (default: 1.0) - Sampling temperature (0-1) - **stream**: boolean (default: false) - Enable streaming responses - **tools**: array - List of tools the model can use ## Examples ### Document Analysis Analyze complex documents ```json { "model": "claude-sonnet-4-5", "max_tokens": 4000, "system": "You are an expert analyst. Provide detailed, structured analysis.", "messages": [ { "role": "user", "content": "Analyze the key themes and implications of this research paper: [paper text]" } ] } ``` ### Code Generation Generate production-quality code ```json { "model": "claude-sonnet-4-5", "max_tokens": 4000, "messages": [ { "role": "user", "content": "Create a TypeScript React component for a data table with sorting, filtering, and pagination. Use modern best practices." } ], "temperature": 0.3 } ``` ### Tool Use Use tools/functions with Claude ```json { "model": "claude-sonnet-4-5", "max_tokens": 1000, "messages": [ { "role": "user", "content": "Look up the current stock price of Apple." } ], "tools": [ { "name": "get_stock_price", "description": "Get the current stock price for a given symbol", "input_schema": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Stock ticker symbol" } }, "required": [ "symbol" ] } } ] } ``` ## Response Format ```json { "id": "chatcmpl-abc123", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Response text here" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 100, "completion_tokens": 50, "total_tokens": 150 } } ``` ## Tips - max_tokens is required - always specify it - Use system prompt for persona and constraints - XML tags in prompts improve structured responses - Temperature max is 1.0 (not 2.0 like OpenAI) - Excellent at following complex, multi-step instructions - Use caching for repeated context to reduce costs ## Documentation https://docs.anthropic.com/en/docs/about-claude/models