# One API key, two endpoints: a safer first call with Claude and GPT

> Source: <https://dev.to/null_jerry_40202ccb6fa17e/one-api-key-two-endpoints-a-safer-first-call-with-claude-and-gpt-55g>
> Published: 2026-09-24 14:08:27+00:00

A valid API key does not mean every model accepts the same request path. When you switch models, check the model's supported endpoint before changing only the model name.

I operate YonshoreAPI. Its public model catalogue at [https://api.yonshore.com/api/pricing](https://api.yonshore.com/api/pricing) lists each model's supported endpoint type. On 24 September 2026, `claude-haiku-4-5-20251001` listed Chat Completions (`openai`), while `gpt-5.6-sol` listed Responses (`openai-response`). These examples describe the current catalogue, not a guarantee of future availability.

Create a limited key in your dashboard, keep it in an environment variable, and confirm that the account has usable balance. A live request can consume that balance.

```
export YONSHORE_API_KEY="your_key_here"

curl https://api.yonshore.com/v1/chat/completions \
  -H "Authorization: Bearer $YONSHORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-haiku-4-5-20251001","messages":[{"role":"user","content":"Reply with OK"}],"max_tokens":16}'
curl https://api.yonshore.com/v1/responses \
  -H "Authorization: Bearer $YONSHORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-sol","input":"Reply with OK"}'
```

For Chat Completions, inspect non-empty output in `choices[0].message.content`. For Responses, check that the response completed and contains output text. In both cases, inspect usage and the account ledger before sending production traffic. An HTTP 200 response containing an error object is not a successful model call.

If you get 401, check the key and Bearer header without posting the key in a screenshot. For 400, check both the model ID and endpoint type against the live catalogue. A 429 indicates a limit. After a timeout, check whether the original request completed before retrying.

The corrected [quickstart](https://github.com/jerrynullmmo/yonshoreapi-quickstart) has curl, Python and Node examples. YonshoreAPI currently does not support access, registration or calls from mainland China; use elsewhere also depends on the relevant upstream provider's rules.

Disclosure: I operate YonshoreAPI. This is an integration walkthrough, not an independent benchmark or a promise of savings or availability.
