Claude Sonnet 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-10-10, last successful call 2026-06-16).
Calls Anthropic's Claude Sonnet model for coding, reasoning, and creative writing tasks, billed per-call via x402 micropayment protocol
Anthropic's balanced model — excellent coding, reasoning, and creative writing
Returns a text completion from Claude Sonnet (Anthropic's balanced model), including generated code, written prose, reasoning chains, or structured outputs depending on the prompt provided.
POSThttps://x402-gateway-production.up.railway.app/api/llm/claude-sonnet?utm_source=zero.xyzChoose this endpoint when you need a high-quality, balanced LLM (Claude Sonnet) for coding, reasoning, or creative writing tasks and want pay-per-call micropayment billing via x402 rather than a subscription. Prefer over GPT or other models when Anthropic's reasoning style or safety characteristics are desired. Ideal for agentic workflows where inference cost should be metered per invocation.
{
"model": "claude-sonnet",
"messages": [
{
"role": "user",
"content": "Write a Python function that validates email addresses using regex and returns True if valid, False otherwise. Include docstring and example usage."
}
],
"max_tokens": 500
}| Field | Type | Description |
|---|---|---|
| inputrequired | object | |
| output | object |
{
"model": "anthropic/claude-4.5-sonnet-20250929",
"usage": {
"cost": 0.007599,
"is_byok": false,
"cost_details": {
"upstream_inference_cost": 0.007599,
"upstream_inference_prompt_cost": 0.000099,
"upstream_inference_completions_cost": 0.0075
},
"total_tokens": 533,
"prompt_tokens": 33,
"completion_tokens": 500,
"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": "```python\nimport re\n\ndef validate_email(email):\n \"\"\"\n Validates an email address using regular expression pattern matching.\n \n This function checks if an email address follows the standard format:\n - Local part (before @): alphanumeric characters, dots, hyphens, underscores\n - @ symbol (required)\n - Domain name: alphanumeric characters and hyphens\n - Top-level domain: 2-6 alphabetic characters after a dot\n \n Args:\n email (str): The email address string 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(\"john.doe123@company.co.uk\")\n True\n >>> validate_email(\"invalid.email@\")\n False\n >>> validate_email(\"@example.com\")\n False\n >>> validate_email(\"user@domain\")\n False\n \"\"\"\n # Regular expression pattern for email validation\n pattern = r'^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$'\n \n # Return True if pattern matches, False otherwise\n if re.match(pattern, email):\n return True\n return False\n\n\n# Example usage\nif __name__ == \"__main__\":\n # Test cases\n test_emails = [\n \"user@example.com\", # Valid\n \"john.doe@company.co.uk\", # Valid\n \"test_email123@domain.org\", # Valid\n \"name+tag@example.com\", # Valid with + (extended pattern)\n \"invalid.email@\", # Invalid - no domain\n \"@example.com\", # Invalid - no local part\n \"user@domain\", # Invalid - no TLD\n \"user name@example.com\", # Invalid - space in local part\n \"user@.com\", # Invalid - missing domain name\n \"user@@example.com\", # Invalid"
}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"