Rivya AI Docs

GPT-5.3 Codex API Integration

Use GPT-5.3 Codex through Rivya Public API v1 with model id gpt-5-3-codex-chat, supported inputs, parameters, Files API rules, credits, and response examples.

Available via APIText input readyChat
API model id

gpt-5-3-codex-chat

Inputs

text, file

Files API

Not required for the minimal request

Base credits

4

Capability

Chat

Readiness

Chat API: non-streaming + SSE streaming

Billing

TOKEN_BASED

Prompt limit

20000 characters

Request contract

Chat requests send one message at a time. Session history is stored by Rivya; do not send a raw messages array.

KeyTypeRequiredDefaultDescription
modelstringYesgpt-5-3-codex-chatUse the gpt-5-3-codex-chat API model id.
session_idstringNo-Optional API-created chat session id. Omit it to start a new session.
messagestringYes-The next user message. Chat API history comes from the server-side session, not a raw messages array.
attachmentsarrayNo-Optional image file_id values returned by Files API. External attachment URLs are not accepted.
enable_web_searchbooleanNofalseOnly applies when the selected chat model supports web search.
reasoning_effortstringNodefaultOptional reasoning effort: default, minimal, low, medium, high, or xhigh when supported.
client_request_idstringNo-Optional client-side id for tracing requests in your system.

Model parameters

This chat model uses the shared Chat API fields above. Model-specific support for web search, image file attachments, thoughts, and reasoning is reflected in the readiness data.

Minimal request

{
  "model": "gpt-5-3-codex-chat",
  "message": "Write a concise launch plan for a new product image campaign"
}

Reference-file request

{
  "model": "gpt-5-3-codex-chat",
  "message": "Write a concise launch plan for a new product image campaign",
  "attachments": [
    {
      "file_id": "file_uploaded_image_id"
    }
  ]
}

Create response

The Chat endpoint returns a completed assistant message, token usage, and the final credit settlement for this turn.

{
  "id": "chatcmpl_msg_gpt_5_3_codex_chat_example",
  "object": "chat.completion",
  "session_id": "chat_session_gpt_5_3_codex_chat",
  "model": "gpt-5-3-codex-chat",
  "created_at": "2026-05-11T00:00:00.000Z",
  "message": {
    "id": "assistant_message_id",
    "role": "assistant",
    "content": "A concise launch plan with clear next steps."
  },
  "usage": {
    "input_tokens": 1200,
    "output_tokens": 320,
    "total_tokens": 1520
  },
  "credits": {
    "reserved": 4,
    "final": 4
  }
}

Common errors

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found, chat_model_not_supported, chat_session_conflict, chat_attachment_not_supported

Chat API supports non-streaming and SSE streaming turns in Public API v1. Image attachments must use Files API file_id values.