GetAPI.ONE
Send a GetAPI.ONE API request
Choose a declared protocol, use a key from an environment variable, replace the model placeholder, inspect the HTTP result, and handle failures without making unsupported endpoint assumptions.
Prerequisites and boundaries
- A scoped GetAPI.ONE key stored in GETAPI_ONE_API_KEY.
- A current catalog model that explicitly lists the endpoint type you intend to call.
- A command line where curl is installed and outbound HTTPS to www.getapi.one is allowed.
- Acceptance that a real request may incur usage charges. The examples were reviewed without sending model requests.
1. Choose the declared endpoint
| Catalog endpoint type | Method and path | Minimal input shape |
|---|---|---|
| OpenAI Responses | POST https://www.getapi.one/v1/responses | model + input |
| OpenAI Chat | POST https://www.getapi.one/v1/chat/completions | model + messages |
Other protocol families use different paths and request bodies. Follow the endpoint shown on the selected model page; do not normalize Anthropic, Gemini, image, or video calls to the two examples above.
2. Responses API example
Use this only after choosing a catalog model that lists the Responses endpoint. Replace YOUR_RESPONSES_MODEL before running it.
curl --fail-with-body https://www.getapi.one/v1/responses \
-H "Authorization: Bearer $GETAPI_ONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_RESPONSES_MODEL",
"input": "Reply with the word ready."
}'3. Chat Completions example
Use this only when the selected catalog model lists the OpenAI Chat endpoint. Replace YOUR_CHAT_MODEL before running it.
curl --fail-with-body https://www.getapi.one/v1/chat/completions \
-H "Authorization: Bearer $GETAPI_ONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_CHAT_MODEL",
"messages": [
{"role": "user", "content": "Reply with the word ready."}
]
}'4. Check the result
- Read the HTTP status first. A 2xx status means the gateway accepted and completed the HTTP request, but your client must still inspect the response object for the expected output.
- For Responses, inspect the returned response status/output structure. For Chat Completions, inspect the returned choices structure. Do not assume one response shape for the other protocol.
- Open the GetAPI.ONE request or usage log and match the time, endpoint, model, and request identifier when available.
Streaming and retries
Streaming changes the response transport and event handling; support depends on the selected endpoint and model. Start with a non-streaming request, then follow the protocol reference and model page before adding stream parameters.
- Do not automatically retry authentication, quota, permission, or model-selection errors.
- Before retrying a timeout or upstream failure, determine whether the original request may have been processed and whether your operation is safe to repeat.
- Use bounded retry counts and backoff in applications; preserve request identifiers and timestamps for diagnosis.
Error branches
| Result | What to check |
|---|---|
| 401 | Environment variable value, accidental whitespace, key status, and ONE key/address pairing. |
| 404 | Exact method/path, duplicate or missing /v1, and whether the client appended another path. |
| Model not found / access denied | Exact catalog name, endpoint badge, key group, model availability, and account permissions. |
| Quota / rate limit | Key expiry and quota, account balance/package, group limits, and current pricing. |
| 5xx / timeout | Network, gateway/upstream error details, request identifier, and whether a safe retry is appropriate. |