Skip to content
PrismRoute

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.

API base URL
https://codex.aicpr.icu/v1
SettingValue
AuthenticationAuthorization: Bearer YOUR_PRISMROUTE_API_KEY
Chat CompletionsPOST /v1/chat/completions
Responses, when supportedPOST /v1/responses
Model IDThe exact ID available to your account

Prepare a key and model

  1. Sign in and open API keys. Create a key for your application and check its group and model restrictions.
  2. Open the model directory and copy the exact model ID. Confirm that it supports the endpoint in your example.
  3. Set the environment variables in the same terminal where you run your application. Replace both placeholders with your own values.
macOS / Linux shell
export PRISMROUTE_API_KEY="YOUR_PRISMROUTE_API_KEY"
export PRISMROUTE_MODEL="YOUR_MODEL_ID"
Windows PowerShell
$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.

Terminal · cURL
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

SettingChat CompletionsResponses
SDK callclient.chat.completions.createclient.responses.create
Input fieldmessagesinput
Text outputchoices[0].message.contentoutput_text in the official SDK
Streamingchoices[].deltaTyped 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.

Technical references