Make your first request.
Three settings connect your application: the base URL, your API key and the exact model ID. Choose the guide that matches your workflow.
Continue in your environment
On this page
Your connection details
Use this API base URL in an OpenAI-compatible SDK. The SDK adds the endpoint path, so keep /v1 only once.
https://codex.aicpr.icu/v1| Setting | Value |
|---|---|
| Authentication | Authorization: Bearer YOUR_PRISMROUTE_API_KEY |
| Chat Completions | POST /v1/chat/completions |
| Responses, when supported | POST /v1/responses |
| Model ID | The exact ID available to your account |
Prepare a key and model
- Sign in and open API keys. Create a key for your application and check its group and model restrictions.
- Open the model directory and copy the exact model ID. Confirm that it supports the endpoint in your example.
- Set the environment variables in the same terminal where you run your application. Replace both placeholders with your own values.
export PRISMROUTE_API_KEY="YOUR_PRISMROUTE_API_KEY"
export PRISMROUTE_MODEL="YOUR_MODEL_ID"$env:PRISMROUTE_API_KEY="YOUR_PRISMROUTE_API_KEY"
$env:PRISMROUTE_MODEL="YOUR_MODEL_ID"Keep the API key on your server or in your desktop client’s private settings. Do not put it in a public repository, browser bundle or URL.
Try a Chat Completions request
This cURL example requires a model that supports Chat Completions. Replace YOUR_MODEL_ID in the JSON body. Run it only when you are ready to send a request.
curl --fail-with-body https://codex.aicpr.icu/v1/chat/completions \
-H "Authorization: Bearer $PRISMROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"messages": [{"role": "user", "content": "Hello, PrismRoute!"}]
}'Read the assistant text from choices[0].message.content. An error response should be read together with its HTTP status. The troubleshooting guide explains the next check for each common case.
Choose the request format
| Setting | Chat Completions | Responses |
|---|---|---|
| SDK call | client.chat.completions.create | client.responses.create |
| Input field | messages | input |
| Text output | choices[0].message.content | output_text in the official SDK |
| Streaming | choices[].delta | Typed events, including response.output_text.delta |
OpenAI recommends Responses for new projects on its own API and continues to support Chat Completions. On PrismRoute, use the interface enabled for your selected model. A successful Chat Completions request does not establish Responses support, hosted-tool support or compatibility with a particular coding client.