Claude Sonnet 4.6 via x402 Gateway is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.060000/call, status unknown (last checked 2026-09-13, last successful call 2026-06-20).
Calls Anthropic's Claude Sonnet 4.6 model for balanced high-quality coding, reasoning, and creative writing tasks via a pay-per-call x402 gateway
Anthropic's latest balanced model — excellent coding, reasoning, and creative writing
A generated text response from Claude Sonnet 4.6 containing the model's answer, code, analysis, or creative output based on the input prompt, billed at $0.06 USDC per call via x402 protocol.
POSThttps://x402-gateway-production.up.railway.app/api/llm/claude-sonnet-4.6Choose this endpoint when you need Anthropic's Claude Sonnet 4.6 specifically — Anthropic's balanced model known for strong coding, reasoning, and creative writing — and want pay-per-call pricing via x402 without a direct Anthropic API subscription. Prefer over Claude Opus when cost efficiency matters and over lighter models when task complexity demands strong reasoning. Prefer over GPT-4o or Gemini Flash when Claude's particular strengths in nuanced coding or extended reasoning are desired.
{
"model": "claude-sonnet-4.6",
"messages": [
{
"role": "user",
"content": "Write a Python function that validates email addresses using regex and returns True if valid, False otherwise. Include docstring and basic test cases."
}
],
"max_tokens": 1024
}{
"model": "anthropic/claude-4.6-sonnet-20260217",
"usage": {
"cost": 0.015462,
"is_byok": false,
"cost_details": {
"upstream_inference_cost": 0.015462,
"upstream_inference_prompt_cost": 0.000102,
"upstream_inference_completions_cost": 0.01536
},
"total_tokens": 1058,
"prompt_tokens": 34,
"completion_tokens": 1024,
"prompt_tokens_details": {
"audio_tokens": 0,
"video_tokens": 0,
"cached_tokens": 0,
"cache_write_tokens": 0
},
"completion_tokens_details": {
"audio_tokens": 0,
"image_tokens": 0,
"reasoning_tokens": 0
}
},
"content": "# Email Address Validator\n\n## Implementation\n\n```python\nimport re\n\n\ndef validate_email(email: str) -> bool:\n \"\"\"\n Validate an email address using regex.\n\n An email is considered valid if it follows the standard format:\n - Local part: alphanumeric characters, dots, underscores, plus signs, hyphens\n - @ symbol (required, exactly one)\n - Domain: alphanumeric characters and hyphens\n - At least one dot in the domain part\n - TLD: 2-7 alphabetic characters (e.g., .com, .org, .museum)\n\n Args:\n email (str): The email address to validate.\n\n Returns:\n bool: True if the email is valid, False otherwise.\n\n Examples:\n >>> validate_email(\"user@example.com\")\n True\n >>> validate_email(\"invalid-email\")\n False\n >>> validate_email(\"\")\n False\n \"\"\"\n if not isinstance(email, str) or not email:\n return False\n\n pattern = r'^[a-zA-Z0-9][a-zA-Z0-9._%+\\-]*@[a-zA-Z0-9\\-]+(\\.[a-zA-Z0-9\\-]+)*\\.[a-zA-Z]{2,7}$'\n\n return bool(re.match(pattern, email))\n\n\ndef run_tests() -> None:\n \"\"\"Run test cases to verify the validate_email function.\"\"\"\n\n test_cases = [\n # (email, expected_result, description)\n\n # ✅ Valid emails\n (\"user@example.com\", True, \"Standard email\"),\n (\"user.name@example.com\", True, \"Dot in local part\"),\n (\"user+tag@example.com\", True, \"Plus sign in local part\"),\n (\"user_name@example.com\", True, \"Underscore in local part\"),\n (\"user123@example.com\", True, \"Numbers in local part\"),\n (\"user@sub.example.com\", True, \"Subdomain\"),\n (\"user@example.co.uk\", True, \"Country-code TLD\"),\n (\"user@example.museum\", True, \"Long TLD\"),\n (\"user-name@example.com\", True, \"Hyphen in local part\"),\n (\"123user@example.com\", True, \"Starts with number\"),\n (\"USER@EXAMPLE.COM\", True, \"All uppercase\"),\n (\"user@my-domain.com\", True, \"Hyphen in domain\"),\n\n # ❌ Invalid emails\n (\"\", False, \"Empty string\"),\n (\"plainaddress\", False, \"No @ symbol\"),\n (\"@missinglocal.com\", False, \"Missing local part\"),\n (\"user@\", False, \"Missing domain\"),\n (\"user@.com\", False, \"Domain starts with dot\"),\n (\"user@com\", False, \"No dot in domain\"),\n (\"user@@example.com\", False, \"Double @ symbol\"),\n (\"user @example.com\", False, \"Space in email\"),\n (\"user@example..com\", False, \"Double dot in domain\"),\n (\"user@example.c\", False, \"TLD too short (1 char)\"),\n (\"user@example.toolongtld\", False, \"TLD too long (>7 chars)\"),\n (\".user@example.com\", False, \"Starts with dot\"),\n (\"user@-example.com\", False, \"Domain starts with hyphen\"),\n (None, False, \"None input\"),\n (12345, False, \"Integer input\"),\n ]\n\n passed = 0\n failed = 0\n\n print(\"=\" * 65)\n print(f\"{'EMAIL VALIDATION TEST RESULTS':^65}\")\n print(\"=\" * 65)\n print(f\"{'Email':<35} {'Expected':<10} {'Got':<10} {'Status'}\")\n print(\"-\" * 65)\n\n for email, expected, description in test_cases:\n result = validate_email(email)\n status = \"✅ PASS\" if result == expected else \"❌"
}Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"