Home / Codex API / GPT models

OpenAI-compatible API for GPT models

Use the OpenAI SDK with AI Prime Tech's gateway URL and a key from the Codex group. Start with a GPT-6 model, test a short request and check usage before integrating a longer workflow.

Create an API keyUse Codex CLI

Models and model IDs

Model Request ID A useful starting point
GPT-6 Astra gpt-6-astra Complex reasoning, difficult debugging and broad technical investigations.
GPT-6.1 Sol gpt-6.1-sol A practical starting point for coding and agent workflows.
GPT-6 Luna gpt-6-luna Small changes, classification and frequent bounded tasks.
GPT-6 Sol gpt-6-sol Existing GPT-6 Sol integrations and migration comparisons.

Recent gateway usage also includes GPT-5.6 Sol, GPT-5.6 Terra and GPT-5.6 Luna. Use GET /v1/models with your key to discover the models available to its group. A public catalogue is an overview; it does not grant a key access to every listed model.

Make a Responses API request

Install the OpenAI Python SDK with python -m pip install openai. Set AIPRIMETECH_API_KEY in your environment, then run:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://aiprimetech.io/v1",
    api_key=os.environ["AIPRIMETECH_API_KEY"],
)
response = client.responses.create(
    model="gpt-6.1-sol",
    input="Reply with one sentence confirming the connection.",
    stream=True,
)
for event in response:
    if event.type == "response.output_text.delta":
        print(event.delta, end="", flush=True)

The client base URL ends in /v1; the SDK adds /responses. This streaming example prints text deltas as they arrive. Successful streaming Responses requests for the four GPT-6 IDs above were present in the gateway's recent usage when this guide was checked.

Choose the endpoint your client needs

Workflow Endpoint or setting
Codex CLI Custom provider with wire_api = "responses"
New application using the OpenAI SDK client.responses.create(...)
Existing chat-completion integration /v1/chat/completions, subject to model and feature support
Model discovery GET /v1/models with the same key

API compatibility is feature-specific. Test tool calls, structured output, image input and other features that your application actually uses. Availability in OpenAI's own platform documentation does not by itself establish support through a third-party gateway. For coding agents, begin with the Responses API and Codex setup guide.

Understand gateway billing

AI Prime Tech bills gateway access under the selected key group and plan. Check the current rate in the dashboard, set a practical usage budget and review a small sample of calls. Published OpenAI list prices are useful context, but they are separate from the charge for an AI Prime Tech request.

For sustained coding sessions, compare prepaid Codex access with any current Codex Unlimited plans in purchases. Claude plans have their own group. Read API access versus a ChatGPT subscription before choosing a product.

Avoid common integration mistakes

Keep the key and its provider together. An OpenAI-issued key belongs at OpenAI's endpoint; an AI Prime Tech key belongs at this gateway. Use the environment variable named in your code. Check the exact model ID and group when you receive an unavailable-model error. Do not retry an authentication or billing error indefinitely.

AI Prime Tech is independent of OpenAI. OpenAI's model catalogue describes the upstream models; this page describes connecting them through our service. Compare the GPT-6 models for coding.