Skip to main content
Sign in

Website navigation

ClientsZ Code

Connect Z Code

Connect Z Code to this API using Anthropic Messages.

On this page

Get a key and the base URL

Create a platform key and set the client’s base URL to https://api.saveapi.cc. The gateway accepts paths with and without /v1.

Configure the client

Open Settings → Model Settings and add a provider. Use the Anthropic settings below with your platform API key. Add and enable the model, then select it in a new chat and send a short message.

For a model that uses the OpenAI format, select OpenAI, set the base URL to https://api.saveapi.cc/v1 and add the model ID from the platform catalog.

Settings
Provider name: SaveAPI
API format: Anthropic
Base URL: https://api.saveapi.cc
API key: YOUR_API_KEY
Model ID: claude-sonnet-5-5

API formats and base URLs

API formatBase URLConfiguration location
Anthropic Messageshttps://api.saveapi.ccSettings → Model Settings · ~/.zcode/v2/config.json
OpenAI Chat Completionshttps://api.saveapi.cc/v1Settings → Model Settings · ~/.zcode/v2/config.json

Verify with cURL

Set AI_API_KEY to your platform key and run the example. HTTP 200 confirms that the key and request URL work. When switching models, use an ID from GET /v1/models.

cURL
curl -sS "https://api.saveapi.cc/v1/messages" \
  -H "x-api-key: $AI_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "claude-sonnet-5-5",
  "max_tokens": 256,
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'

Troubleshooting

StatusWhat to do
401Check that the request carries an active platform key in the correct header.
402Check your wallet balance and top up before retrying.
404Check the API format, path, and model ID. Use the ID from GET /v1/models.
429Reduce request rate or concurrency. Wait for Retry-After when present, or back off between attempts.
5xxThe service may be unavailable or timed out. Check the original call and usage history before retrying with bounded backoff.

Include the x-request-id response header when reporting an issue, if available. It identifies the request on this platform.

Frequently asked questions

Should the base URL end in /v1?

Follow the API format table above. The client appends the request path. Avoid repeating /v1 or using the full request path as the base URL.

Can I use another model?

Yes. Choose an enabled model that works with your API format and use its exact ID from GET /v1/models.

Can the client send images?

This platform’s model endpoints accept text input only. Select text if the client lets you set the input type.

How do I adjust truncated output?

In the model’s Advanced settings, check its output and context limits. Use the model’s specifications and cap output at 32768.