List Models
The model-list API reflects the current key's permissions and is safer than keeping a permanent hard-coded list.
OpenAI-compatible list
bash
# This GET request has no JSON body.
# The key is read from the environment variable set earlier.
curl https://sprelaytoken.com/v1/models \
-H "Authorization: Bearer $SPRELAY_API_KEY"A shortened response looks like this:
json
{
"object": "list",
"data": [
{
"id": "gpt-5.6-sol",
"object": "model"
}
]
}data is the model array, and each id is a model name you can copy exactly into a request. The real response may contain more models and fields. JSON cannot contain comments, so the explanation stays outside the block.
Python
python
# os reads the environment; OpenAI is the compatible SDK client.
import os
from openai import OpenAI
# Keep /v1 in the SDK base URL and never hard-code the real key.
client = OpenAI(
api_key=os.environ["SPRELAY_API_KEY"],
base_url="https://sprelaytoken.com/v1",
)
# list() calls GET /v1/models; print each reusable model ID.
for model in client.models.list().data:
print(model.id)Gemini-native list
bash
# Gemini native authentication uses x-goog-api-key without Bearer.
curl https://sprelaytoken.com/v1beta/models \
-H "x-goog-api-key: $SPRELAY_API_KEY"Use the API list to choose a model for this key. Use the Model Catalog to compare groups, protocols, and live prices. If the list is empty, check key status, expiration, group, model restrictions, and current group availability.
