Claude Haiku 5.5
Messages API
- Endpoint
POST https://chuaone.si/v1/messages- Authentication
Authorization: Bearer $CHUA_API_KEY- Required header
anthropic-version: 2023-06-01- Idempotency
Idempotency-Key- Output limit
max_tokens- Response receipt
X-CHUA-Request-ID
if ([string]::IsNullOrWhiteSpace($env:CHUA_API_KEY)) { throw "Set CHUA_API_KEY" }
$headers = @{
Authorization = "Bearer $env:CHUA_API_KEY"
"anthropic-version" = "2023-06-01"
"Idempotency-Key" = [guid]::NewGuid().ToString()
}
$body = @'
{
"model": "claude-haiku-5.5",
"messages": [
{
"role": "user",
"content": "Hello"
}
],
"max_tokens": 256,
"stream": false
}
'@
try {
$response = Invoke-WebRequest -UseBasicParsing -Method Post -Uri "https://chuaone.si/v1/messages" -Headers $headers -ContentType "application/json" -Body ([Text.Encoding]::UTF8.GetBytes($body)) -TimeoutSec 180 -MaximumRedirection 0 -ErrorAction Stop
if ([int]$response.StatusCode -lt 200 -or [int]$response.StatusCode -ge 300) { throw "Unexpected HTTP status" }
$content = $response.Content
if ($response.PSObject.Properties.Name -contains "RawContentStream") {
$content = [Text.Encoding]::UTF8.GetString($response.RawContentStream.ToArray())
}
} catch {
throw "CHUA request failed; check the request record before retrying."
}
$response.Headers["X-CHUA-Request-ID"]
$contentUse the exact published model slug shown in the example. CHUA ONE does not silently switch to another model.
Requests containing images conservatively reserve the published budget for the model's full context window before dispatch and may require a higher available balance or project budget. After completion, CHUA ONE charges only the actual usage confirmed by the upstream provider and releases the difference. Image bytes and URL length are not priced as tokens. The complete JSON request body must not exceed 2 MiB.
For Haiku 5.5, embed images as Base64 only. Omit detail or set it to auto; image URLs and detail values low or high are not accepted.