Skip to main content
POST
OpenAI Chat

Authorizations

Authorization
string
header
required

Pass the API Key obtained from AiToEarn. Go to the "API Key Tutorial". Example: Bearer xxx.

Body

application/json
messages
object[]
required

Message list

Minimum array length: 1
Example:
model
string
required

Model ID. First call the "Conversation Model List" interface (GET /api/ai/models/chat) and pass in the data[n].name returned by it.

Example:

"gpt-5.6-terra"

stream
boolean
default:false

Whether to stream the return

Example:

false

Response

Native third-party protocol response or SSE data, not wrapped in the AiToEarn common response envelope.

Last modified on July 31, 2026