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
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.

stream
boolean

Whether to stream the return

Response

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

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