Responses

Create a response

POST
/v1/responses

OpenAI Responses format, non-streaming and streaming (SSE).

Works with models that support the Responses API; the endpoints each model supports are listed on the model square. This is the endpoint Codex CLI uses.

Authorization

BearerAuth
headerAuthorizationBearer <token>

Authenticate with an API key. Format: Authorization: Bearer sk-xxxxxx. Create keys on the API Keys page of the console (https://ai.myaiexp.com/keys).

Request Body

application/json
  1. body
model*string

Model ID, for example your-model-id. Replace it with a model ID from the model square (https://ai.myaiexp.com/pricing), or call GET /v1/models to list the models your key can use.

input?|array<>

Input: a string or an array of messages

instructions?string
max_output_tokens?integer
temperature?number
top_p?number
stream?boolean
tools?array<>
tool_choice?string|
reasoning?
previous_response_id?string
truncation?string
Value in"auto""disabled"

Response Body

Response created

application/json
  1. response
id?string
object?string
created_at?integer
status?string
Value in"completed""failed""in_progress""incomplete"
model?string
output?array<>
usage?
Example Request
curl -X POST 'https://ai.myaiexp.com/v1/responses' \  -H 'Content-Type: application/json' \  -d '{  "model": "your-model-id",  "input": "Introduce yourself in one sentence",  "max_output_tokens": 600}'
Example Response
{  "id": "resp_deaedc17-0a80-9bbf-bab3-9aa18d893838",  "object": "response",  "created_at": 1791367100,  "model": "your-model-id",  "status": "completed",  "output": [    {      "id": "msg_ffe2ee94",      "type": "message",      "role": "assistant",      "status": "completed",      "content": [        {          "type": "output_text",          "text": "I'm an AI assistant."        }      ]    }  ],  "usage": {    "input_tokens": 52,    "output_tokens": 18,    "total_tokens": 70  }}

This service is provided for learning and research purposes only. Please follow each model provider's usage policies.