# Scenario Integration via LowCodeAPI
**Last Updated**: February 10, 2026
## Overview
AI image generation platform for creating custom images and training models
**Categories:**
- {'id': 'image-generation', 'name': 'Image Generation AI'}
## Base Endpoint
https://api.lowcodeapi.com/scenario
**Important**: Always include the provider name in the URL path after `api.lowcodeapi.com/`
## Authentication
**Type:** TOKEN
**Official Documentation:** https://docs.scenario.com/docs/getting-started
## URL Format (Important)
LowCodeAPI supports two URL formats. **Always try the New Format first**, then fall back to Old Format if needed.
### New Format (Priority)
- Path parameters stay in the URL path
- Do NOT include path parameters as query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/{id}?api_token=XXX`
### Old Format (Fallback)
- Path parameters become query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/id?id={id}&api_token=XXX`
### Decision Flow for AI Agents
1. Always use **New Format** first - keep path parameters in the URL path
2. If you get a 404 or error, try **Old Format** with sanitized path
3. Log which format worked for future requests to this provider
## API Categories
## Common Endpoints
### Remove the background of a given image
**Method:** PUT
**LowCodeAPI Path:** /v1/images/erase-background
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/images/erase-background?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/images/erase-background?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| assetId | string | |
| backgroundColor | string | |
| format | string | |
| image | string | |
| name | string | |
| returnImage | boolean | |
**Example Request (New Format):**
```bash
curl -X PUT 'https://api.lowcodeapi.com/scenario/v1/images/erase-background?api_token=YOUR_API_TOKEN'
```
### Pixelate a given image
**Method:** PUT
**LowCodeAPI Path:** /v1/images/pixelate
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/images/pixelate?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/images/pixelate?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| assetId | string | |
| colorPalette | array | |
| image | string | |
| name | string | |
| pixelGridSize | number | |
| removeBackground | boolean | |
| removeNoise | boolean | |
| returnImage | boolean | |
**Example Request (New Format):**
```bash
curl -X PUT 'https://api.lowcodeapi.com/scenario/v1/images/pixelate?api_token=YOUR_API_TOKEN'
```
### Remove Background of a given image
**Method:** PUT
**LowCodeAPI Path:** /v1/images/remove-background
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/images/remove-background?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/images/remove-background?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| backgroundColor | string | |
| data | string | |
| format | string | |
**Example Request (New Format):**
```bash
curl -X PUT 'https://api.lowcodeapi.com/scenario/v1/images/remove-background?api_token=YOUR_API_TOKEN'
```
### Upscale a given image
**Method:** PUT
**LowCodeAPI Path:** /v1/images/upscale
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/images/upscale?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/images/upscale?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| assetId | string | |
| forceFaceRestoration | boolean | |
| image | string | |
| name | string | |
| photorealist | boolean | |
| returnImage | boolean | |
| scalingFactor | number | |
**Example Request (New Format):**
```bash
curl -X PUT 'https://api.lowcodeapi.com/scenario/v1/images/upscale?api_token=YOUR_API_TOKEN'
```
### Get all inferences
**Method:** GET
**LowCodeAPI Path:** /v1/inferences
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/inferences?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/inferences?api_token=YOUR_API_TOKEN
**Query Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| pageSize | string | |
| paginationToken | string | |
**Example Request (New Format):**
```bash
curl -X GET 'https://api.lowcodeapi.com/scenario/v1/inferences?api_token=YOUR_API_TOKEN'
```
### List all models
**Method:** GET
**LowCodeAPI Path:** /v1/models
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/models?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/models?api_token=YOUR_API_TOKEN
**Query Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| pageSize | string | |
| paginationToken | string | |
| privacy | string | |
| status | string | |
**Example Request (New Format):**
```bash
curl -X GET 'https://api.lowcodeapi.com/scenario/v1/models?api_token=YOUR_API_TOKEN'
```
### Create a new model
**Method:** POST
**LowCodeAPI Path:** /v1/models
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/models?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/models?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| classSlug | string | |
| name | string | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/scenario/v1/models?api_token=YOUR_API_TOKEN'
```
### Get a model's details including its training status and training progress if available
**Method:** GET
**LowCodeAPI Path:** /v1/models/{modelId}
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/models/{modelId}?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/models/modelId?modelId={modelId}&api_token=YOUR_API_TOKEN
**Path Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| modelId | string | |
**Example Request (New Format):**
```bash
curl -X GET 'https://api.lowcodeapi.com/scenario/v1/models/{modelId}?api_token=YOUR_API_TOKEN'
```
### Update a particular model
**Method:** PUT
**LowCodeAPI Path:** /v1/models/{modelId}
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/models/{modelId}?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/models/modelId?modelId={modelId}&api_token=YOUR_API_TOKEN
**Path Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| modelId | string | |
**Example Request (New Format):**
```bash
curl -X PUT 'https://api.lowcodeapi.com/scenario/v1/models/{modelId}?api_token=YOUR_API_TOKEN'
```
### Delete a model
**Method:** DELETE
**LowCodeAPI Path:** /v1/models/{modelId}
**New Format URL:**
https://api.lowcodeapi.com/scenario/v1/models/{modelId}?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/scenario/v1/models/modelId?modelId={modelId}&api_token=YOUR_API_TOKEN
**Path Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| modelId | string | |
**Example Request (New Format):**
```bash
curl -X DELETE 'https://api.lowcodeapi.com/scenario/v1/models/{modelId}?api_token=YOUR_API_TOKEN'
```
## Usage Examples
### Example 1: Basic Chat Completion
Creating a simple text completion or chat message:
```bash
# Create a chat completion - no path parameters needed
curl -X POST "https://api.lowcodeapi.com/scenario/v1/chat/completions?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model-name",
"messages": [
{"role": "user", "content": "Hello, how can you help me?"}
]
}'
# Response includes generated content
```
### Example 2: Text Generation with Path Parameters
Generating text with specific model settings:
```bash
# Generate content using a specific model
curl -X POST "https://api.lowcodeapi.com/scenario/v1/models/generate?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a short poem about technology",
"max_tokens": 100
}'
# Or if the provider uses model in the path:
curl -X POST "https://api.lowcodeapi.com/scenario/v1/models/{MODEL_ID}:generateContent?api_token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "Write a short story"}]}]
}'
```
### Example 3: List Available Models
```bash
# Get list of available models
curl -X GET "https://api.lowcodeapi.com/scenario/v1/models?api_token=YOUR_API_TOKEN"
```
## Error Handling
LowCodeAPI returns standard HTTP status codes. Common errors:
| Status Code | Description |
|-------------|-------------|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters or request body |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Endpoint or resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Provider API error |
All error responses include error details:
```json
{
"data": {
"error": {
"message": "Error description",
"code": "ERROR_CODE"
}
}
}
```
## Complete Endpoint Reference
| Endpoint | Method | Category |
|----------|--------|----------|
| Remove the background of a given image | PUT | Images Edition |
| Pixelate a given image | PUT | Images Edition |
| Remove Background of a given image | PUT | Images Edition |
| Upscale a given image | PUT | Images Edition |
| Get all inferences | GET | Images Generation |
| List all models | GET | Models |
| Create a new model | POST | Models |
| Get a model's details including its training statu... | GET | Models |
| Update a particular model | PUT | Models |
| Delete a model | DELETE | Models |
| List all categories of a model | GET | Models |
| List all classes for a model and category | GET | Models |
| Copy a model to a new model including all of its t... | POST | Models |
| Trigger a model training | PUT | Models |
| Add a new training image to a model | POST | Models |
| Delete a training image from a model | DELETE | Models |
| Transfer (with a copy or a full ownership change) ... | POST | Models |
| Delete a training image | DELETE | Models / Images |
| Get all inferences for a particular model | GET | Models / Images |
| Create a new inference for a specific model | POST | Models / Images |
| Delete an inference | DELETE | Models / Images |
| Delete all inferences of a model | DELETE | Models / Images |
| Get an inference including its status | GET | Models / Images |
| Delete an inference and all its generated images | DELETE | Models / Images |
| Get a particular image of an inference | GET | Models / Images |
| Delete an image from an inference | DELETE | Models / Images |
| List all tags | GET | Tags |
| Get usages. Maximum time range with custom startDa... | GET | Usage |
## API Definition Endpoints
You can fetch the complete API specification for this provider:
**New Format (OpenAPI spec):**
```bash
curl 'https://backend.lowcodeapi.com/scenario/openapi'
```
**Old Format (API definition):**
```bash
curl 'https://backend.lowcodeapi.com/scenario/definition'
```
## Response Format
All responses are wrapped in a `data` key:
```json
{
"data": {
// Actual response from provider (object or array)
}
}
```