Get Playground Response
Test AI responses with custom model, prompt, and settings.
Test AI responses with custom settings — override the model, system prompt, temperature, and more without changing your project's saved configuration. Each call deducts credits based on the model used.
Authorization
Your API token must have one of the following:
- Access Role: Owner, Editor, Viewer, or Trainer (broad access), OR
- Fine-grained Permission: Debugging module with Read enabled
How to Use
- Call Create Playground Session to get a
session_uid - Call this API with the
session_uid, yourquery, and optionalagent_settingoverrides - Compare responses by changing
model,system_prompt, ortemperatureacross calls
Authorization
bearerToken
API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.
In: header
Request Body
application/json
The project UID.
Session UID from Create Playground Session.
The user query to test. Maximum 5000 characters.
Override AI agent settings for this test.
Previous messages for context. Maximum 50 items.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.yourgpt.ai/chatbot/v1/playgroundAgentResponse" \ -H "Content-Type: application/json" \ -d '{ "project_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "session_uid": "your_session_uid_here", "query": "How do I get started with your product?" }'{
"type": "RXSUCCESS",
"message": "AI reply",
"data": {
"session_uid": 0,
"message": "Hello! How can I help you?",
"response_time": 2500,
"total_credits": 1200
}
}{
"type": "RXERROR",
"message": "string"
}{
"type": "RXERROR",
"message": "string"
}{
"type": "RXERROR",
"message": "string"
}Available Models
To get the list of supported models, call the Get Supported Models API:
curl -X POST https://api.yourgpt.ai/chatbot/v1/getSupportedModels \
-H "Content-Type: application/json" \
-d '{}'Use the value field from the response as agent_setting.model. If not provided, the project's saved model is used.