Back to Blog
EnglishNews

Claude Haiku 5.5 API: Verify Messages Responses Before Adopting It

Two Haiku 5.5 gateway Messages requests pass a plain marker and strict JSON fixture. The article separates those observations from documented specifications and untested features.

J
Jeff M
October 11, 2026 / 215 views
Share:
Claude Haiku 5.5 API: Verify Messages Responses Before Adopting It

Claude Haiku 5.5 appears in Anthropic’s current model documentation and in the tested gateway catalog. Before adopting it, verify the protocol, final stop state and actual output on the route your application will use.

Crazyrouter was the gateway for this 2-case experiment: 2 cases met the declared complete-output criterion; the results below retain the failures and their limits.

By Jeff M · Tested November 3, 2026

How do I call Claude Haiku 5.5 and verify the Messages response?#

The live requests use the gateway Messages endpoint, x-api-key and anthropic-version 2023-06-01. The key belongs to Crazyrouter and is not sent to Anthropic’s native host. This distinction matters even when the payload resembles the native API.

One request asks for the exact marker HAIKU-1455, and the other asks for a small JSON object with a boolean and integer. Both returned HTTP 200, end_turn and the expected content. Text blocks are joined explicitly; a tool-use stop would not satisfy these tests.

November 3 experiment and observed results#

The scripts ran on Windows with Python 3.10.2 and synthetic inputs. Gateway generation and catalog requests use https://api.crazyrouter.com; paths and complete payloads appear in the code. Each result describes this run only. A test program exiting successfully means its observations were recorded, not that every model response passed.

Requested model IDVisible to this credential
claude-haiku-5-5Yes
Route / caseHTTP or turnsFinish / outcomeAcceptedObserved output or error
claude-haiku-5-5 / marker200end_turnYesHAIKU-1455
claude-haiku-5-5 / JSON200end_turnYes{"ok":true,"count":3}

Observed successful-envelope response IDs (failed acceptance can still have an ID):

text
msg_011Cgg8THzyRYZQ1MXSqwf3x
msg_011Cgg8TSde1yrqr8PGGCRo2

Exact output contract: Complete response and declared JSON or marker required

Separate model documentation from measured capability#

Anthropic’s overview currently lists Haiku 5.5 and links its model resources. That is a source for documented positioning, not evidence that this test exercised its context limit, tools, vision or maximum output. The two requests used synthetic text only.

This revision removes blanket capability and price conclusions derived from a name alone. The gateway pricing configuration also contains tier logic, so a base “from” price should not be used as an unconditional quote for every context length.

Add application-specific checks before a larger rollout#

Retain the original request shape, output, stop reason and response identifier for each evaluated task. Test missing fields, malformed outputs and failures separately. If your application switches to Chat Completions or streaming, treat those as distinct contracts.

This run did not create an Anthropic account, verify native billing or benchmark throughput. It establishes two completed gateway Messages fixtures with the exact model string shown below.

Reproduce the experiment#

Install requests, set CRAZYROUTER_API_KEY in the process environment, save this complete script and run it with Python 3.10 or later. Requests use your authorized credential and can consume usage. Authorization headers are not printed.

python
import json
import os
import time
import requests

BASE = "https://api.crazyrouter.com/v1"

def catalog(models):
    with requests.Session() as s:
        s.trust_env=False
        r=s.get(BASE+"/models",headers={"Authorization":"Bearer "+os.environ["CRAZYROUTER_API_KEY"]},timeout=(10,40),allow_redirects=False)
        r.raise_for_status();names={x["id"] for x in r.json()["data"]}
    return {m:m in names for m in models}

def chat(model,prompt,**options):
    payload={"model":model,"messages":[{"role":"user","content":prompt}],**options}
    record={"model":model,"request":payload};start=time.perf_counter()
    try:
        with requests.Session() as s:
            s.trust_env=False
            r=s.post(BASE+"/chat/completions",headers={"Authorization":"Bearer "+os.environ["CRAZYROUTER_API_KEY"]},json=payload,timeout=(10,65),allow_redirects=False)
        record["http"]=r.status_code
        if r.status_code==200:
            d=r.json();c=d["choices"][0];record.update(response_id=d.get("id"),output=c["message"].get("content"),finish=c.get("finish_reason"),usage=d.get("usage",{}))
        else:record["error"]="HTTP_"+str(r.status_code)
    except (requests.RequestException,ValueError,KeyError,IndexError) as e:record["error"]=type(e).__name__
    record["seconds"]=round(time.perf_counter()-start,3)
    return record

def parsed(row):
    if row.get("finish")!="stop":return None
    try:return json.loads(row.get("output") or "null")
    except (ValueError,TypeError):return None

def emit(**data):print(json.dumps(data,ensure_ascii=False))

model="claude-haiku-5-5";available=catalog([model]);rows=[]
if available[model]:
    for name,prompt,expected in [("marker","Return exactly HAIKU-1455 with no formatting.","HAIKU-1455"),("JSON",'Return only JSON {"ok":true,"count":3}.',{"ok":True,"count":3})]:
        payload={"model":model,"max_tokens":512,"messages":[{"role":"user","content":prompt}]};record={"model":model,"case":name,"request":payload};started=time.perf_counter()
        try:
            with requests.Session() as s:
                s.trust_env=False
                r=s.post(BASE+"/messages",headers={"x-api-key":os.environ["CRAZYROUTER_API_KEY"],"anthropic-version":"2023-06-01"},json=payload,timeout=(10,65),allow_redirects=False)
            record["http"]=r.status_code
            if r.status_code==200:
                d=r.json();text="".join(x.get("text","") for x in d.get("content",[]) if x.get("type")=="text")
                record.update(output=text,finish=d.get("stop_reason"),response_id=d.get("id"),usage=d.get("usage",{}))
                try:value=text if name=="marker" else json.loads(text)
                except ValueError:value=None
                record["passed"]=value==expected and d.get("stop_reason")=="end_turn"
            else:record.update(error="HTTP_"+str(r.status_code),passed=False)
        except (requests.RequestException,ValueError,KeyError) as e:record.update(error=type(e).__name__,passed=False)
        record["seconds"]=round(time.perf_counter()-started,3);rows.append(record)
emit(catalog=available,requests=rows,local_tests=[],endpoint=BASE+"/messages",scope="Gateway Messages only, not a request to Anthropic's native host")

Catalog visibility and attempted cases: Absent IDs were not silently substituted

Sources checked November 3, 2026: Anthropic model overview, Anthropic Messages reference. Official descriptions and gateway observations are separate evidence.

FAQ#

Was the native Anthropic host called?#

No. Both requests used Crazyrouter’s Messages endpoint.

Did both fixtures pass?#

Yes: one exact marker and one strict JSON object.

What stop state was required?#

end_turn for these ordinary Messages replies.

Were tools or vision tested?#

No. These tests used ordinary synthetic text.

Can I apply one base price to every request?#

Do not assume that; inspect the relevant tier and billing configuration.

Does a response authenticate the model weights?#

No. It records the requested route and observed behavior.

Last actually tested: November 3, 2026. This API-dependent article is due for review December 3, 2026.

Implementation Guides

Podcast

AI Dev Tools: The Crazyrouter Podcast

Short episodes for developers on AI APIs, gateways, cost control and coding tools.

Latest episodes

  • EP196 · Oct 29, 2026 · 6:53

    AI API Security Posture — Turn Controls Into Continuous Evidence

    A practical guide to AI API security posture: inventory exposure, verify controls continuously, protect keys and data, constrain tools, and turn security assumptions into evidence that operators can act on.

  • EP195 · Oct 28, 2026 · 7:21

    AI API Policy Drift — Detect When Production Rules Stop Matching Intent

    A practical guide to policy drift in AI APIs: version routing and safety rules, detect stale enforcement, compare intended and observed behavior, and restore control before small gaps become incidents.

Episodes with written show notes →

Related Articles