Agents
Markdown ↗

Docs for agents

Read this contract, identify the installed client, then follow its specific integration guide. These static public documents contain no account credentials.

Connection contract

The API host is https://api.zrelay.net. OpenAI-compatible SDKs normally use https://api.zrelay.net/v1; the Anthropic SDK normally uses https://api.zrelay.net because it appends /v1/messages. Client adapters can build paths differently: always use the base URL in the specific client guide instead of copying one SDK setting into another tool.

Use Chat Completions for an enabled chat route, Responses (preview) only for an enabled Responses route, and Anthropic Messages for Messages-compatible routes. Image routes have separate formats and eligibility. Changing the host does not translate request bodies or make every provider feature available.

Native Gemini clients

For a catalog-enabled native Gemini route use https://api.zrelay.net as the server base and x-goog-api-key authentication. The client appends /v1beta/models/{model}:generateContent or :streamGenerateContent. Query-string ?key= authentication is not accepted. Follow the Antigravity CLI guide for its model selector; this does not configure the Antigravity IDE/App.

Authentication and secrets

For OpenAI-compatible requests use Authorization: Bearer $ZRELAY_API_KEY. For Messages use x-api-key and anthropic-version: 2023-06-01. Read the authentication reference before changing headers. Store credentials in the client’s supported secret store or server environment, never in prompts, documentation requests, committed configuration, browser bundles or logs.

Ask the user to supply credentials through that secure mechanism. Do not ask them to paste a key, account recovery code, private prompt or response into the setup conversation. Preserve unrelated accounts, providers and existing configuration; change only the settings needed for the requested integration.

Select a live route

Read the public live catalog for current options. Authenticated GET /v1/models lists models accessible to the configured key. Select provider, pool, exact model ID and endpoint together; a model name in an example is not a promise of current access, pricing or availability.

A visible model does not prove support for tools, reasoning controls, streaming, image input or every client runtime. Confirm the requested capability and endpoint in the catalog and relevant compatibility reference. Respect published output maxima and other limits; do not automatically raise budgets or retry rejected requests. No price table or model inventory in this document overrides live discovery.

Follow the client guide

Identify the application and installed version before editing files. Start with coding agent guides or SDKs and frameworks, then fetch that article’s Markdown link. A maintained configuration recipe and an integration checklist have different evidence: preserve any version and runtime limitations in the article. Consult its linked official documentation when a setting differs in the installed version.

Configure the provider and base URL explicitly, select the matching model and pool, and keep the existing client settings outside that scope. If the article does not establish a working recipe for the client or runtime, explain the missing evidence rather than inventing flags or claiming compatibility. Desktop applications and agent plugins can impose additional authentication or routing restrictions.

Validate within the authorized budget

First inspect the configuration and request path without exposing credentials. Before any paid request, obtain authorization already required by the user’s workflow; a setup prompt alone does not grant unlimited inference or installation. If authorized, use one short request with a small output budget, then check streaming and tools separately when needed. See errors and spending controls.

Handle timeouts and failures explicitly. Do not retry a potentially chargeable operation blindly, bypass key limits or continue a tool loop without bounds. Report what was inspected, what was actually tested, and remaining runtime limitations. Never describe static configuration review as a successful paid integration test.

Read the right document

The compact entry point is /docs/ai.md. The root /llms.txt points to key readings; /docs/llms.txt is the complete grouped index. Every public article has a Markdown export generated from the same content. llms.txt is a community convention, not a guarantee that an assistant discovers or obeys it automatically. Give the assistant the contract and the specific client article explicitly.

Questions about your integration? support@zrelay.net