跳转到主要内容
POST
/
api
/
{baseId}
/
ai
/
generate
cURL
curl --request POST \
  --url https://app.teable.ai/api/api/%7BbaseId%7D/ai/generate \
  --header 'Authorization: Bearer REPLACE_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 generated AI text.

result
string
必填
Last modified on March 5, 2026