API Documentation
API tokens are authentication credentials that allow programmatic access to Problembo services. Use tokens to integrate our AI services into your applications, scripts, or workflows.
API Tokens Documentation
Overview
API tokens are authentication credentials that allow programmatic access to Problembo services. Use tokens to integrate our AI services into your applications, scripts, or workflows.
Getting Started
Creating a Token
- Log in to your Problembo account and navigate to the API
- Click the "Create Token" button
- Enter a descriptive name for your token
- Select an expiration period (or set "Never expires")
- Click "Create" to generate the token
- Important: Copy the token immediately - you won't be able to see it again!
Token Security
- Never share tokens with other people
- Don't add tokens to version control systems (Git, SVN, etc.)
- Use environment variables to store tokens in applications
- Regularly rotate tokens for improved security
- Revoke compromised tokens immediately
API Usage
Base URL
https://problembo.com/apis/v1/clientEndpoints
POST /apis/v1/client/tasks- Create a new taskGET /apis/v1/client/tasks/{taskId}- Get task status and result
Authentication
Include your API token in the Authorization header of each request:
Authorization: Bearer YOUR_API_TOKENRequest Structure
All task creation requests have a unified structure:
{
"taskType": "task_type",
"payload": {
// task-specific parameters
}
}Getting JSON Examples
💡 Important: JSON examples for specific task types can be obtained directly in the interface of each service through the "Json for API" button. This is the easiest way to learn the correct request structure for the service you need.
Available Task Types
Main task types (taskType):
com.problembo.proto.SdImageClientTaskPr- Image generationcom.problembo.proto.VideoGenClientTaskPr- Video generationcom.problembo.proto.SongGenClientTaskPr- Music generationcom.problembo.proto.TtsGenClientTaskPr- Text-to-Speech synthesiscom.problembo.proto.UpscaleSimpleClientTaskPr- Image upscalingcom.problembo.proto.BgRemoveClientTaskPr- Background removalcom.problembo.proto.VideoEnhanceClientTaskPr- Video enhancement- and others
Request Examples
Creating a Task (POST)
Request:
curl -X POST https://problembo.com/apis/v1/client/tasks \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"taskType": "com.problembo.proto.SdImageClientTaskPr",
"payload": {
"base": {
"prompt": "1girl, beautiful anime character",
"negativePrompt": "nsfw, low quality",
"imageQuantity": 1,
"model": "SdModel_WaifuStudio_1",
"aspectRatioPreset": "ASPECT_RATIO_VERTICAL_16_9",
"performanceMode": "SD_IMAGE_GEN_MODE_SPEED"
},
"promptMode": "PromptMode_default"
}
}'Response (successful creation):
{
"taskCreated": {
"taskId": "00331b93-31bd-4e33-b28c-cc46793a911f",
}
}Getting Result (GET)
Request:
curl -X GET https://problembo.com/apis/v1/client/tasks/00331b93-31bd-4e33-b28c-cc46793a911f \
-H "Authorization: Bearer YOUR_API_TOKEN"Response (task in progress):
{
"taskId": "00331b93-31bd-4e33-b28c-cc46793a911f",
"status": "EXECUTING",
"ready": false
}Response (task completed successfully):
{
"taskId": "00331b93-31bd-4e33-b28c-cc46793a911f",
"status": "END_SUCCESS",
"ready": true,
"completedAt": "2025-11-04T07:14:33Z",
"result": {
"@type": "type.googleapis.com/com.problembo.proto.SdImageClientTaskPr.Result",
"taskResult": [
{
"origFilename": "problembo-result-20251104071432.jpg",
"url": "https://prbo.gateway.storjshare.io/910e1b85-4677-49d4-abd3-41218733ab60.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&..."
}
]
}
}Response (execution error):
{
"taskId": "00331b93-31bd-4e33-b28c-cc46793a911f",
"status": "END_ERR",
"ready": true,
"error": {
"errorKey": "SD_PROMPT_NOT_SAFE",
"text": "Prompt contains unsafe content"
}
}Task Statuses
A task can be in one of the following statuses:
PENDING- Task created and awaiting processingASSIGN_TO_WORKER- Task being assigned to workerEXECUTING- Task is executingEND_SUCCESS- Task completed successfullyEND_ERR- Task completed with errorEND_TIMEOUT- Execution timeout exceeded
The ready field indicates whether the task is completed (regardless of result).
Complete Workflow
Typical API workflow scenario:
# 1. Create task
TASK_ID=$(curl -X POST https://problembo.com/apis/v1/client/tasks \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"taskType": "...", "payload": {...}}' \
| jq -r '.taskCreated.taskId')
echo "Task ID: $TASK_ID"
# 2. Poll status
while true; do
RESPONSE=$(curl -s https://problembo.com/apis/v1/client/tasks/$TASK_ID \
-H "Authorization: Bearer $API_TOKEN")
STATUS=$(echo $RESPONSE | jq -r '.status')
READY=$(echo $RESPONSE | jq -r '.ready')
echo "Status: $STATUS"
if [ "$READY" = "true" ]; then
if [ "$STATUS" = "END_SUCCESS" ]; then
echo "Task completed successfully!"
echo $RESPONSE | jq '.result'
else
echo "Task failed!"
echo $RESPONSE | jq '.error'
fi
break
fi
sleep 5
doneToken Management
Token Naming
Give tokens meaningful names to identify their purpose:
production-serverdevelopment-testingmobile-app-v2
Expiration Settings
Choose appropriate expiration based on your use case:
- 30 days: Testing and development
- 90 days: Short-term projects
- 1 year: Long-term applications
- Never expires: Critical infrastructure (rotate manually)
Token Status
Tokens can have the following statuses:
- Active: Token is valid and can be used
- Disabled: Temporarily disabled, can be re-enabled
- Expired: Expiration period passed, cannot be used
- Revoked: Permanently invalidated
Rate Limiting
API uses distributed rate limiting to protect against overload:
Endpoint Limits
- POST /apis/v1/client/tasks: 15 requests per 60 seconds
- GET /apis/v1/client/tasks/{id}: 120 requests per 60 seconds
Rate Limit Response
When you exceed the limit, you'll receive HTTP status 429 Too Many Requests:
HTTP/1.1 429 Too Many Requests
Retry-After: 60
Content-Type: application/json
{
"error": "rate_limit_exceeded"
}The Retry-After header indicates how many seconds to wait before retrying.
Note: Rate limiting may be disabled by default. Check current limits with support.
Error Codes
HTTP Status Codes
- 200 OK - Request processed successfully
- 400 Bad Request - Invalid request or validation error
- 401 Unauthorized - Invalid or missing token
- 404 Not Found - Task not found
- 429 Too Many Requests - Rate limit exceeded
- 500 Internal Server Error - Internal server error
Task Error Codes (errorKey)
When task execution fails, the response will contain an error field with an error code:
Access and Billing Errors
BILLING_ACCESS_DENIED- Insufficient balanceIP_BILLING_ACCESS_DENIED- IP address blockedIP_BAN- IP address bannedANONYMOUS_USER- Authentication requiredNOT_PAID_USER- Feature available only to paid users
Validation Errors
PARSE_TASK- JSON request parsing errorINVALID_INPUT_FILE- Invalid input fileSD_EMPTY_PROMPT- Empty promptSD_PROMPT_TOO_LONG- Prompt too longSD_NO_LATIN_PROMPT- Prompt must be in Latin charactersSD_PROMPT_NOT_SAFE- Prompt contains unsafe content
Limits
MAX_PARALLEL_TASKS_PER_IP- Parallel tasks per IP limit exceededMAX_TASKS_PER_USER- User tasks limit exceeded
System Errors
SERVICE_DISABLED- Service temporarily disabledMAINTENANCE- Maintenance in progressBUSY- System overloadedTIMEOUT- Task execution timeout exceededNOT_FOUND- Task not foundUNKNOWN_ERROR- Unknown error
Best Practices
- Use separate tokens for different applications or environments
- Set appropriate expiration periods for your use case
- Implement polling with reasonable intervals (3-5 seconds recommended)
- Handle all possible task statuses in your code
- Implement retry logic with exponential backoff for rate limiting
- Check balance before sending large numbers of tasks
- Cache results when possible to avoid redundant requests
- Handle errors gracefully - log errorKey for debugging
- Monitor token usage in the statistics section
Troubleshooting
Token Not Working
- Ensure the token is active and not expired
- Check the header format is correct:
Authorization: Bearer TOKEN - Ensure the account has sufficient credits
- Check that the token starts with prefix
pbo_pat_
401 Unauthorized Error
Possible causes:
- Token is invalid, expired, or revoked
- Incorrect Authorization header format
- Extra spaces or characters in token
- Token not copied completely
Solution:
# Correct
curl -H "Authorization: Bearer pbo_pat_..."
# Incorrect
curl -H "Authorization: pbo_pat_..." # missing "Bearer"
curl -H "Authorization: Bearer pbo_pat_..." # double space429 Too Many Requests Error
You've exceeded the rate limit.
Solution:
- Wait for the time specified in
Retry-Afterheader - Implement exponential backoff between retries
- Optimize task status polling frequency
- Use batching for bulk operations
BILLING_ACCESS_DENIED Error
Insufficient balance.
Solution:
- Check balance in your account
- Top up balance
- Ensure correct pricing plan is selected
SD_PROMPT_NOT_SAFE Error
Prompt contains unsafe or prohibited content.
Solution:
- Check prompt for prohibited words
- Use more neutral phrasing
- Contact support if you believe the prompt is appropriate
Task Stuck in EXECUTING Status
Task is taking longer than usual.
Solution:
- Continue polling status - some tasks can take 5-10 minutes
- Check system status on monitoring page
- If task doesn't complete after 15 minutes, contact support with taskId
Examples in Other Languages
JavaScript/TypeScript
const API_TOKEN = "pbo_pat_your_token";
const BASE_URL = "https://problembo.com/apis/v1/client/tasks";
const headers = {
"Authorization": `Bearer ${API_TOKEN}`,
"Content-Type": "application/json"
};
// Create task
async function createTask() {
const response = await fetch(BASE_URL, {
method: "POST",
headers,
body: JSON.stringify({
taskType: "com.problembo.proto.SdImageClientTaskPr",
payload: {
base: {
prompt: "beautiful landscape",
imageQuantity: 1,
model: "SdModel_XL_anime"
}
}
})
});
const data = await response.json();
return data.taskCreated.taskId;
}
// Poll status
async function waitForTask(taskId: string) {
while (true) {
const response = await fetch(`${BASE_URL}/${taskId}`, { headers });
const data = await response.json();
console.log(`Status: ${data.status}`);
if (data.ready) {
return data;
}
await new Promise(resolve => setTimeout(resolve, 5000));
}
}
// Usage
const taskId = await createTask();
console.log(`Task created: ${taskId}`);
const result = await waitForTask(taskId);
if (result.status === "END_SUCCESS") {
console.log("Success!", result.result);
} else {
console.log("Failed!", result.error);
}Support
Need help? Contact our support team:
- Email: support@problembo.com
- Telegram: @problembo_support
Last updated: November 2025
