How to use GPT through an API
Create a Clydex key, choose a model and make a first Responses API request. Keep secrets on your server.
1. Prepare an account and key
Sign in to Clydex, choose a pool and create an API key. Check its balance and the model's current availability. Store the key as CLYDEX_API_KEY on your server. The base URL is https://clydex.shop/v1.
2. Send a small Responses request
Choose an exact model ID from the catalog and send a short input to POST /v1/responses with Bearer authentication. The documentation below includes copyable client and SDK examples. Begin without streaming or tools so you can verify the basic response.
3. Inspect and extend
Check the HTTP status, model response and recorded usage in your account. A 401 needs credential checks; a 429 needs rate-limit handling; an unavailable model may require waiting or an explicitly selected alternative. Add streaming and client-executed tools only after the simple request works.
curl https://clydex.shop/v1/responses \
-H "Authorization: Bearer $CLYDEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-6.1-sol","input":"Hello"}'