Which endpoint does your application need?
Check the method your client calls. client.chat.completions.create, client.responses.create and Anthropic Messages send different request bodies and return different structures. Changing a URL does not convert one protocol into another.
The table describes CLODEX routes. It does not promise that every model supports all three. Check tools, images, streaming and other optional features separately for the exact model ID you intend to use.
| Client / protocol | Endpoint and input | Response to handle |
|---|---|---|
| Chat Completions | POST /v1/chat/completions · messages | choices[].message; finish_reason; usage |
| Responses | POST /v1/responses · input | output items; status; usage. Not choices. |
| Anthropic-compatible Messages | POST /v1/messages · messages + max_tokens | content blocks; stop_reason; usage |
Check a model before migrating an application
A successful text request confirms only that request. It does not validate an agent with files, long context or concurrent tool calls. Test the capabilities your application actually needs separately.
- Read /v1/models using your application’s key and choose an exact data[].id. A public model page does not replace this check.
- Match that ID to a documented protocol. Do not copy parameters from another model merely because their names look similar.
- Send one short request without tools, attachments or streaming. It is a paid generation; set a test quota beforehand.
- Inspect the response format and completion reason. Add optional features one at a time so you can identify what breaks.
Compare the cost of an accepted result
Prepare a small set of your own tasks and decide in advance what counts as an accepted answer: passing tests, valid JSON or correct field extraction. Identical inputs and acceptance criteria are more useful than comparing one price per million tokens.
For split token pricing, calculate uncached input, cached input and output at their respective rates. If a tariff uses Fixed Usage for total tokens, follow that published rule instead of automatically applying this formula. Never count the same cached input twice.
- Record the model ID, task size, attempts, actual spending and why an answer was rejected.
- Include unsuccessful paid attempts in total_actual_spend. If no answers pass, cost per accepted result is undefined.
- Keep the measurement date with latency and tariff records. One successful run is not a speed guarantee.
cost = uncached_input / 1_000_000 * input_rate
+ cached_input / 1_000_000 * cache_rate
+ output / 1_000_000 * output_rate
cost_per_accepted_result = total_actual_spend / accepted_results
Check connectivity from the deployment environment
Test from the server that will run the application, not just your home browser. DNS, TLS, corporate proxies and outbound network rules can differ. A browser opening the website does not establish that the server can reach an authenticated API route.
A CLODEX key works with the CLODEX endpoint. It does not create an account with a model owner or purchase a subscription to their website. Check available payment options in your dashboard. This page does not promise access from every network or identical conditions for every account.
Documentation and example scope
Connection settings follow CLODEx documentation. Examples target the stated protocol; they are not recorded inference results and do not promise identical features across models. A successful generation request can incur a charge.
Frequently asked questions
Which protocol should a new bot use?
Use one supported by both your client and chosen model. Validate one non-streaming text request first rather than implementing several protocols at once.
Can I switch models by changing the ID?
Only when the required protocol and capabilities match. Check parameters, response handling, limits and billing before switching production traffic.
Why can a lower token rate cost more overall?
Retries, long outputs and rejected answers also consume balance. Compare actual spending on accepted results for the same task.