Create Playground Session

Create a new playground session to test AI responses.

Create a new playground session to test AI responses with different settings. Use the returned session_uid with the Get Playground Response API.

Authorization

Your API token must have one of the following:

  • Access Role: Owner, Editor, or Operator (broad access), OR
  • Fine-grained Permission: Conversation module with Write enabled
POST
/createPlaygroundAgentSession

Authorization

bearerToken

AuthorizationBearer <token>

API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.

In: header

Request Body

application/json

project_uid*string

The project UID.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.yourgpt.ai/chatbot/v1/createPlaygroundAgentSession" \  -H "Content-Type: application/json" \  -d '{    "project_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"  }'
{
  "type": "RXSUCCESS",
  "message": "Agent session created successfully",
  "data": {
    "session_uid": 17756505168357552,
    "id": 0,
    "project_id": 0,
    "is_emulator": true
  }
}
{
  "type": "RXERROR",
  "message": "string"
}
{
  "type": "RXERROR",
  "message": "string"
}