跳转到主要内容
POST
/
api
/
{baseId}
/
ai
/
generate-stream
cURL
curl --request POST \
  --url http://127.0.0.1:3000/api/api/{baseId}/ai/generate-stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "task": "coding",
  "modelKey": "openai@gpt-4o@custom-name"
}
'
{
  "result": "<string>"
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

baseId
string
必填

请求体

application/json
prompt
string
必填
task
enum<string>

Quick model selection via predefined task type

可用选项:
coding,
embedding,
translation
示例:

"coding"

modelKey
string

Specify an exact model configuration to use

示例:

"openai@gpt-4o@custom-name"

响应

201 - application/json

Returns ai generate stream.

result
string
必填
Last modified on December 10, 2025