OpenAI Responses
Send input using the OpenAI Responses format. This page shows HTTP streaming. See the related guide for Codex client setup.
Before you start
Follow the quickstart to get an API key and select an endpoint that accepts direct HTTP calls. The example reads the Bearer token from ICODEEASY_API_KEY. Replace YOUR_MODEL_ID with a model ID supported by your endpoint.
Request example
Set model and input, then use stream: true for SSE.
curl -N -sS https://api.icodeeasy.cc/v1/responses \
-H "Authorization: Bearer $ICODEEASY_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"model": "YOUR_MODEL_ID",
"input": "Say hello.",
"stream": true
}'
Read the response
Append delta from response.output_text.delta. response.completed signals success. response.incomplete carries a reason in response.incomplete_details. Handle response.failed or error as failures even if HTTP already returned 200.
event: response.output_text.delta
data: {"type":"response.output_text.delta","delta":"Hello!"}
event: response.completed
data: {"type":"response.completed","response":{"id":"resp_example","status":"completed","usage":{"input_tokens":10,"output_tokens":4,"total_tokens":14}}}
Read input_tokens and output_tokens from response.usage in the terminal event. When present, input_tokens_details.cached_tokens is the cached portion of the input.
Related guides
Getting Started
Create an account, obtain an API key, choose an endpoint, and send a first request to confirm that I Code Easy is working.
Codex Setup
Install Codex CLI, store the API key in auth.json, configure the I Code Easy provider and Base URL, and start a first Codex session.
Model Capability Catalog
Compare public text, image, and video models by normalized request ID, compatible protocols, supported clients, tool use, media capabilities, limits, and review date.