Relay365Multi-model API relay desk
← All desk bulletins
Wire & endpointsEN1 desk reads

Duty Log: Your First OpenAI-Compatible API Request

Your first model API request needs three things in the right place: an API key, a destination address, and a model identifier. An OpenAI-compatible API lets you send that request using conventions understood by OpenAI client libraries, even when another service handles the request or supplies the model.

That gives new developers a familiar starting point. You can learn one request format and reuse much of that knowledge across providers. The important detail is that compatibility covers an interface; it does not make every model or service behave identically.

The client sends a request to a specific address

An API is a way for your program to ask another system to do something. For a text model, that usually means sending instructions and receiving generated text. Your program is the client. The service receiving the request is the server.

An SDK is a library that handles some of the request plumbing for you. The OpenAI SDK can construct requests, attach credentials, and turn responses into objects your code can read. When a service supports the relevant OpenAI API format, you can often use that SDK by changing its configuration.

A relay sits between your application and model providers. It receives your request and routes it onward. Relay365 offers a pay-as-you-go relay desk for multiple model families, which can be useful when you want to try different models through one service.

Three settings belong on the first-request checklist

  • Your API key authenticates your application to the service, so use the key issued by the service you are calling.
  • Your base URL tells the SDK where to send requests, so configure it before making the first call.
  • Your model identifier selects the model, so copy the exact supported identifier from the service’s model listing or documentation.

Relay365’s API base is https://api.api365relay.com. For an OpenAI client, configure the base URL as https://api.api365relay.com/v1. The SDK then adds the endpoint path for the operation you call. Check the resulting address if you see a routing error; accidentally repeating /v1 can send a valid request to the wrong location.

Keep your API key in an environment variable or a server-side secret store. Browser code and public repositories can expose credentials to other people. If a key is exposed, revoke it and issue a replacement.

A small text exchange makes the first test readable

Start with a short prompt such as, “Explain an API in two sentences.” Choose a supported text endpoint and use the simplest request shown in the service’s documentation. For a chat completions request, you typically supply a model and a messages array containing roles and text.

For example, you might select Gemini 2.5 Flash if it is available in your account. Its display name may differ from the exact string required in the model field. Copying that identifier matters more than matching the capitalization of its marketing name.

Read the returned text and any usage information before adding conversation history, tools, or streaming. Streaming delivers output incrementally, which changes how your application reads and displays the response.

Compatibility still needs a feature check

Support for one OpenAI endpoint does not establish support for every other endpoint. Chat Completions and Responses are separate APIs. Tool calling, image input, structured output, and streaming can also vary by model and service. Confirm the specific combination your application needs.

Relay365 works with Claude Code, Codex, Gemini CLI, and OpenAI SDKs. Follow the setup instructions for your chosen tool because command-line clients can require different configuration settings.

The first error usually points to one setting

If authentication fails, check the key and destination. If the service cannot find the model, check its identifier and your account’s access. If a parameter is rejected, compare it with the supported endpoint documentation. Rate limits and account balances can also prevent an otherwise valid request from completing.

Once a basic request works, Relay365 is a practical option for exploring multiple model families with pay-as-you-go billing. Create an account, check the available models and their prices, and run a small test before connecting a larger workflow. Record the working base URL, model identifier, and endpoint so your next session starts from a known configuration.

Further desk bulletins

Curious how it runs on your own code? Sign up →