This proxy exposes a stateless chat completion gateway to OpenAI's anonymous API. It tracks no sessions on the server side and forwards chat histories by accepting conversation pointers directly from the client.
| Parameter | Type | Required | Description |
|---|---|---|---|
| message | string | Required | The text prompt input from the user. |
| conversation_id | string (UUID) | Optional | The existing conversation UUID. Omit or pass null to start a new chat. |
| parent_message_id | string (UUID) | Optional | The UUID of the last assistant response message in this conversation. |
| stream | boolean | Optional | Whether to stream response tokens. Defaults to false. |
Returns a standard JSON payload once the full assistant response is generated.
{
"response": "Hello! How can I help you today?",
"conversation_id": "6a4fa50e-88a4-83ea-ab5a-3c922477409f",
"parent_message_id": "2efc0562-d140-4b61-9ffd-2e6324ead651",
"model": "gpt-5-5",
"title": "Greeting Request"
}
Returns a text/event-stream where each chunk line begins with data: followed by a JSON object. We use Event Types to simplify streaming data and avoid duplicates:
Fired repeatedly to transmit the generated response tokens. Empty text deltas are never output.
data: {"type": "text", "content": "Hello"}
Sent exactly once as soon as the session IDs are resolved by the backend. The client must store these to carry context into follow-up prompts.
data: {
"type": "session",
"conversation_id": "6a4fa518-0604-83ea-a95d-7cdd125743a9",
"parent_message_id": "2efc0562-d140-4b61-9ffd-2e6324ead651"
}
Sent exactly once when model matching and thread title generation complete on OpenAI's server.
data: {
"type": "metadata",
"model": "gpt-5-5",
"title": "Secret Code Reminder"
}
Fired once as the final message to signify the end of transmission.
data: {"type": "done"}
Fired if any communication or gateway failure occurs during execution.
data: {
"type": "error",
"error": "OpenAI returned status code 400",
"detail": "..."
}