Skip to main content
POST
/
v1
/
assistant
/
create-assistant
create-assistant
curl --request POST \
  --url https://assistant-01.in.rapida.ai/v1/assistant/create-assistant \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "Support assistant",
  "assistantProvider": {
    "model": {
      "modelProviderName": "openai",
      "template": {
        "prompt": [
          {
            "role": "system",
            "content": "You are a helpful support assistant."
          }
        ],
        "promptVariables": [
          {
            "name": "customerName",
            "type": "string",
            "defaultValue": "there"
          }
        ]
      },
      "assistantModelOptions": [
        {
          "key": "model",
          "value": "gpt-4o-mini"
        }
      ]
    }
  }
}
'
{
  "code": 200,
  "success": true,
  "data": {
    "id": "2230142097179373568",
    "name": "Support assistant",
    "status": "active",
    "visibility": "private",
    "assistantProvider": "model",
    "assistantProviderModel": {
      "modelProviderName": "openai",
      "status": "active"
    }
  }
}

Authorizations

x-api-key
string
header
required

API key from Rapida credentials.

Headers

x-client-source
enum<string>
default:sdk

Client source identifier. SDK clients send this automatically.

Available options:
sdk
x-auth-id
string

Optional user identifier to propagate with the request.

Body

application/json
assistantProvider
object
required

Provider configuration for the assistant. Provide exactly one of model, agentkit, or websocket.

name
string
required

Assistant name.

Example:

"Support assistant"

assistantKnowledges
object[]
assistantTools
object[]
description
string

Assistant description.

Example:

"Answers customer support questions."

visibility
string

Assistant visibility.

Example:

"private"

language
string

Assistant language code.

Example:

"en"

source
string

Optional source system for imported assistants.

sourceIdentifier
string

Optional source-system identifier.

Pattern: ^[0-9]+$
Example:

"2227823180112723968"

tags
string[]
Example:
["support", "production"]

Response

Assistant created.

code
integer<int32>
Example:

200

success
boolean
Example:

true

data
object
error
object

Platform error response details. errorCode is a stable platform error code. See PlatformErrorCode for documented code/message mappings.