Flex API Documentation
https://flex-beta-engine.onrender.com
The Flex API allows you to gather insights from Steam gaming profiles and use them in predictive models for personality and skill assessment. The API analyzes gaming achievements, playtime, and behavior patterns to generate personality descriptions and attribute scores.
Table of Contents
Authentication
All endpoints are publicly accessible and require no authentication.
Endpoints
GET /
Description: Welcome message and API status check.
Response:
Welcome to the Flex API
POST /player
Description: Generate a comprehensive player profile including personality description and attribute scores.
Request Body:
{
"steam_id": "76561198063857355",
"name": "PlayerName" // Optional
}
Parameters:
steam_id
(string, required): 17-digit Steam IDname
(string, optional): Player name for personalized description
Response:
{
"steam_id": "76561198063857355",
"name": "Marius",
"description": "Marius exhibits exceptional creativity, collaboration, and strategic thinking, evidenced by their extensive engagement in games like Garry's Mod and Tabletop Simulator...",
"attributes": {
"thoroughness": 0.7655,
"achieving": 0.8766,
"analytical": 0.6544,
"creativity": 0.5433,
"resilience": 0.7110,
"organisation": 0.8110,
"grit": 0.6234
}
}
POST /player/attributes
Description: Get all personality attribute scores without generating a description (faster response).
Request Body:
{
"steam_id": "76561198063857355"
}
Parameters:
steam_id
(string, required): 17-digit Steam ID
Response:
{
"thoroughness": {
"model_prediction": 0.2345,
"attribute_score": 0.7655
},
"achieving": {
"model_prediction": 0.1234,
"attribute_score": 0.8766
},
"analytical": {
"model_prediction": 0.3456,
"attribute_score": 0.6544
},
"creativity": {
"model_prediction": 0.4567,
"attribute_score": 0.5433
},
"resilience": {
"model_prediction": 0.2890,
"attribute_score": 0.7110
},
"organisation": {
"model_prediction": 0.1890,
"attribute_score": 0.8110
},
"grit": {
"model_prediction": 0.3210,
"attribute_score": 0.6234
}
}
POST /player/attributes/{attribute}
Description: Get a single personality attribute score (fastest response).
URL Parameters:
attribute
(string): One of the available attributes
Available Attributes:
thoroughness
- Attention to detail and accuracyachieving
- Goal-setting and task completion abilityanalytical
- Problem-solving and logical reasoningcreativity
- Innovation and original thinkingresilience
- Recovery from adversity and adaptabilityorganisation
- Planning and task managementgrit
- Perseverance and passion for long-term goals
Request Body:
{
"steam_id": "76561198063857355"
}
Response:
{
"grit": {
"model_prediction": 0.2345,
"attribute_score": 0.7655
}
}
Error Response (Invalid Attribute):
{
"error": "Attribute 'invalid_attribute' not supported. Available attributes: thoroughness, achieving, analytical, creativity, resilience, organisation, grit"
}
POST /player/description
Description: Generate only the personality description without attribute scores (faster than full /player endpoint).
Request Body:
{
"steam_id": "76561198063857355",
"name": "PlayerName" // Optional
}
Parameters:
steam_id
(string, required): 17-digit Steam IDname
(string, optional): Player name for personalized description
Response:
{
"steam_id": "76561198063857355",
"name": "Marius",
"description": "Marius exhibits exceptional creativity, collaboration, and strategic thinking, evidenced by their extensive engagement in games like Garry's Mod and Tabletop Simulator..."
}
Error Handling
Common Error Responses
400 Bad Request:
{
"error": "No user found with the given steam id."
}
400 Bad Request (Missing Data):
{
"error": "Error: no user games found"
}
401 Unauthorized:
{
"error": "Unauthorized"
}
500 Internal Server Error:
{
"error": "An error occurred while processing attribute 'attribute_name': error details"
}
HTTP Status Codes
200
- Success400
- Bad Request (invalid parameters, missing data)401
- Unauthorized (missing or invalid API key)500
- Internal Server Error
Rate Limiting
Currently, there are no explicit rate limits documented. However, for production use, consider implementing reasonable request intervals to avoid overloading the service.
Examples
Get Player Profile with cURL
curl -X POST https://flex-beta-engine.onrender.com/player \
-H "Content-Type: application/json" \
-d '{
"steam_id": "76561198063857355",
"name": "TestPlayer"
}'
Get Single Attribute with cURL
curl -X POST https://flex-beta-engine.onrender.com/player/attributes/creativity \
-H "Content-Type: application/json" \
-d '{
"steam_id": "76561198063857355"
}'
Support
For API access, support, or questions:
Attribution
The Flex API uses machine learning models trained on gaming achievement data to predict personality traits and cognitive abilities. For more information about the training data and assessment quality, visit www.flex.game.