claude-sonnet-4-20250514
Text To Text
Create an chat message
POST
Authorization
- Auth Type:
Bearer Auth(In:header) - Format:
Authorization: Bearer <YOUR_API_KEY> - Description: Use
Bearer <YOUR_API_KEY>. Format:Authorization: Bearer sk-xxxxxx. - API Key: where API Key is your AGCloud API KEY
Response Examples
Async Chat Response Field Description
Streaming Events
Parameters
Messages Array Structure
System Array Structure
Tools Array Structure
Max Uses Structure
The
max_uses parameter limits the number of searches performed. If Claude attempts more searches than allowed, the web_search_tool_result will be an error with the max_uses_exceeded error code.
Domain Filtering
When using domain filters:
- Domains should not include the HTTP/HTTPS scheme (use example.com instead of https://example.com)
- Subdomains are automatically included (example.com covers docs.example.com)
- Specific subdomains restrict results to only that subdomain (docs.example.com returns only results from that subdomain, not from example.com or api.example.com)
- Subpaths are supported (example.com/blog)
- You can use either allowed_domains or blocked_domains, but not both in the same request
- Request-level domain restrictions must be compatible with organization-level domain restrictions configured in the Console
User Location Structure
Theuser_location object allows you to localize search results based on user’s location: