Gatepx separates account management from inference traffic. Sign in at gatepx.ai, manage keys in the dashboard, and send supported API requests to https://api.gatepx.ai/v1. This guide uses the chat completions endpoint and a model that supports chat.
Create an application key
Open API Keys in your dashboard and create a key for this application. Store its value as the server-side environment variable GATEPX_API_KEY. Keep it out of browser bundles, source control, URLs, screenshots, and logs.
Use the available key restrictions to suit the application. A separate key for development makes it easier to revoke test access without interrupting production. Your Gatepx website password and upstream provider credentials are not substitutes for a Gatepx API key.
Find a model your key can use
curl --fail-with-body https://api.gatepx.ai/v1/models \
-H "Authorization: Bearer $GATEPX_API_KEY"The model list contains IDs in data[].id. Select a chat-capable enabled ID and copy it exactly. If the list is empty, check your account and key restrictions or contact [email protected]. Do not guess availability from an article or a screenshot of the public catalog.
Send a small chat request
curl --fail-with-body https://api.gatepx.ai/v1/chat/completions \
-H "Authorization: Bearer $GATEPX_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "YOUR_ENABLED_MODEL",
"messages": [{"role": "user", "content": "Explain an API gateway in one sentence."}]
}'Replace YOUR_ENABLED_MODEL with the enabled ID you selected. Run the example on your server or a trusted development machine. The --fail-with-body option lets recent curl versions return a failing exit status for HTTP errors while retaining the response body for diagnosis.
Read the response and check usage
For a successful text chat response, inspect choices[0].message.content. Where the selected model returns usage information, token counts appear under usage. Generated text and token counts depend on the request and model; sample responses in documentation are illustrative.
Open your dashboard usage logs to review the request. If the call fails, inspect the HTTP status and error body before repeating it. Check the model ID, key status, permissions, and available account balance or quota.
Keep the response request ID when contacting support, but redact the Authorization header and sensitive prompt content. The troubleshooting checklist explains what to check next. The quickstart documentation remains the reference for current integration details.