DEV Community

Seven
Seven

Posted on

Claude protocol without the OpenAI-only mental model

Disclosure and availability: DaoXE is a multi-model multi-protocol API gateway we operate. It supports OpenAI Chat Completions, OpenAI Responses, Anthropic Messages (Claude protocol), and OpenAI-compatible image generation where available. It is not available in mainland China. This article is for developers in regions allowed by the service terms.

Many gateway writeups stop at "OpenAI-compatible".

That phrase is useful for SDKs. It is incomplete if your stack also speaks Claude protocol — that is, the Anthropic Messages API (POST /v1/messages with x-api-key and anthropic-version).

This post is a practical smoke test for that path. It does not claim the gateway only serves Claude models. Multi-model catalogs can still speak the Claude protocol for clients that need it.

What "Claude protocol" means here

Term Meaning in this post
Claude protocol Anthropic Messages-shaped HTTP API
Endpoint POST https://daoxe.com/v1/messages
Auth x-api-key (not only Authorization: Bearer)
Version header anthropic-version: 2023-06-01 (or the version your client requires)
Model ID Exact ID from your current account catalog

If a client is Claude Code, an Anthropic SDK, or a provider manager that only knows Messages, this is the path to verify first.

1. Discover a model for this account

Do not hardcode a blog model name.

export DAOXE_API_KEY="your_api_key"

curl --fail-with-body --show-error --silent \
  -H "Authorization: Bearer $DAOXE_API_KEY" \
  "https://daoxe.com/v1/models"
Enter fullscreen mode Exit fullscreen mode

Copy one exact ID into:

export DAOXE_MODEL="paste_exact_model_id_here"
Enter fullscreen mode Exit fullscreen mode

2. Send one tiny Messages request

Keep output small. You want connectivity, not a demo essay.

curl --fail-with-body --show-error --silent \
  -H "x-api-key: $DAOXE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"$DAOXE_MODEL\",
    \"max_tokens\": 8,
    \"messages\": [{\"role\":\"user\",\"content\":\"Reply with OK.\"}]
  }" \
  "https://daoxe.com/v1/messages"
Enter fullscreen mode Exit fullscreen mode

Pass/fail:

  • Pass: HTTP 200 with a short assistant payload or usage metadata
  • Fail: auth error, model-not-found, wrong path, HTML error page

This request may be billed. Check pricing and balance first.

3. Do not confuse protocol success with "Claude-only product"

A successful Messages call proves:

  • base host and /v1/messages path
  • key auth style for Anthropic-shaped clients
  • that this model ID is callable right now for your account

It does not prove:

  • every client should use Messages
  • only Claude models exist on the gateway
  • OpenAI Chat Completions / Responses / image endpoints are unused

DaoXE still exposes those other protocol surfaces for other clients.

4. Match the client to the protocol

Client shape Usually verify first
OpenAI SDK / many IDE "OpenAI Compatible" forms Chat Completions https://daoxe.com/v1
Newer agent stacks Responses /v1/responses if the client uses it
Claude Code / Anthropic SDK / Messages-only tools Messages /v1/messages
Image generation tools /v1/images/generations when the catalog model supports it

If curl Messages works and Claude Code fails, stop changing models and prompts. Compare base URL shape (https://daoxe.com vs https://daoxe.com/v1), header names, and whether the client rewrites paths.

5. Living setup notes

Homepage (tracked): daoxe.com

Closing checklist

  1. List whether the real client speaks Messages or Chat Completions.
  2. Discover model IDs from the current account.
  3. Smoke-test one tiny /v1/messages request with Anthropic-style headers.
  4. Only then configure Claude Code or other Messages clients.
  5. Keep keys out of git and screenshots.

Multi-protocol means you can choose the dialect the client needs — including Claude protocol — without pretending the whole product is OpenAI-only.

Top comments (0)