Skip to main content
POST
/
api
/
{baseId}
/
ai
/
generate
cURL
curl --request POST \
  --url http://127.0.0.1:3000/api/api/{baseId}/ai/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "task": "coding",
  "modelKey": "openai@gpt-4o@custom-name"
}
'
{
  "result": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

baseId
string
required

Body

application/json
prompt
string
required
task
enum<string>

Quick model selection via predefined task type

Available options:
coding,
embedding,
translation
Example:

"coding"

modelKey
string

Specify an exact model configuration to use

Example:

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

Response

201 - application/json

Returns generated AI text.

result
string
required