# Leap AI Integration via LowCodeAPI
**Last Updated**: February 10, 2026
## Overview
AI image and video generation platform for creating visual content
**Categories:**
- {'id': 'video-generation', 'name': 'Video Generation AI'}
## Base Endpoint
https://api.lowcodeapi.com/leapai
**Important**: Always include the provider name in the URL path after `api.lowcodeapi.com/`
## Authentication
**Type:** TOKEN
**Official Documentation:** https://docs.tryleap.ai/api-reference/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
### Create Model
**Method:** POST
**LowCodeAPI Path:** /api/v1/images/models
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models?api_token=YOUR_API_TOKEN
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| subjectIdentifier | string | |
| subjectKeyword | string | |
| subjectType | string | |
| title | string | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/leapai/api/v1/images/models?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/createmodel
### Upload Image Samples
**Method:** POST
**LowCodeAPI Path:** /api/v1/images/models/{modelId}/samples
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/modelId/samples?modelId={modelId}&api_token=YOUR_API_TOKEN
**Path Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| modelId | string | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/samplescontroller_create-1
### Queue Training Job
**Method:** POST
**LowCodeAPI Path:** /api/v1/images/models/{modelId}/queue
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/queue?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/modelId/queue?modelId={modelId}&api_token=YOUR_API_TOKEN
**Path Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| modelId | string | |
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| baseWeightsId | string | |
| steps | number | |
| webhookUrl | string | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/queue?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/queuetrainingjob
### List Image Samples
**Method:** GET
**LowCodeAPI Path:** /api/v1/images/models/{modelId}/samples
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/modelId/samples?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/leapai/api/v1/images/models/{modelId}/samples?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/samplescontroller_findall-1
### Retrieve a Single Model
**Method:** GET
**LowCodeAPI Path:** /api/v1/images/models/{modelId}
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/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/leapai/api/v1/images/models/{modelId}?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/retrievesinglemodel
### Get Image Sample
**Method:** GET
**LowCodeAPI Path:** /api/v1/images/models/{modelId}/samples/{sampleId}
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples/{sampleId}?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/modelId/samples/sampleId?modelId={modelId}&sampleId={sampleId}&api_token=YOUR_API_TOKEN
**Path Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| modelId | string | |
| sampleId | string | |
**Example Request (New Format):**
```bash
curl -X GET 'https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples/{sampleId}?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/samplescontroller_findone-1
### Upload Image Samples Via Url
**Method:** POST
**LowCodeAPI Path:** /api/v1/images/models/{modelId}/samples/url
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples/url?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/modelId/samples/url?modelId={modelId}&api_token=YOUR_API_TOKEN
**Path Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| modelId | string | |
**Query Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| returnInObject | boolean | |
**Request Body:**
| Field | Type | Description |
|-------|------|-------------|
| images | array of strings | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples/url?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/samplescontroller_createurl
### List All Models
**Method:** GET
**LowCodeAPI Path:** /api/v1/images/models
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models?api_token=YOUR_API_TOKEN
**Query Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| returnInObject | boolean | |
**Example Request (New Format):**
```bash
curl -X GET 'https://api.lowcodeapi.com/leapai/api/v1/images/models?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/listallmodels
### Delete a Model
**Method:** DELETE
**LowCodeAPI Path:** /api/v1/images/models/{modelId}
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/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/leapai/api/v1/images/models/{modelId}?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/modelscontroller_remove
### Archive Image Sample
**Method:** POST
**LowCodeAPI Path:** /api/v1/images/models/{modelId}/samples/{sampleId}/archive
**New Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples/{sampleId}/archive?api_token=YOUR_API_TOKEN
**Old Format URL:**
https://api.lowcodeapi.com/leapai/api/v1/images/models/modelId/samples/sampleId/archive?modelId={modelId}&sampleId={sampleId}&api_token=YOUR_API_TOKEN
**Path Parameters:**
| Parameter | Type | Description |
|-----------|------|-------------|
| modelId | string | |
| sampleId | string | |
**Example Request (New Format):**
```bash
curl -X POST 'https://api.lowcodeapi.com/leapai/api/v1/images/models/{modelId}/samples/{sampleId}/archive?api_token=YOUR_API_TOKEN'
```
**Official Documentation:** https://docs.tryleap.ai/reference/samplescontroller_remove
## 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/leapai/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/leapai/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/leapai/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/leapai/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 |
|----------|--------|----------|
| Create Model | POST | Fine-Tuning |
| Upload Image Samples | POST | Fine-Tuning |
| Queue Training Job | POST | Fine-Tuning |
| List Image Samples | GET | Fine-Tuning |
| Retrieve a Single Model | GET | Fine-Tuning |
| Get Image Sample | GET | Fine-Tuning |
| Upload Image Samples Via Url | POST | Fine-Tuning |
| List All Models | GET | Fine-Tuning |
| Delete a Model | DELETE | Fine-Tuning |
| Archive Image Sample | POST | Fine-Tuning |
| List All Model Versions | GET | Fine-Tuning |
| Get Model Version | GET | Fine-Tuning |
| Generate an image using a text prompt | POST | Generate Images |
| Fetch a list of inference jobs for a particular mo... | GET | Generate Images |
| Get a single inference job | GET | Generate Images |
| Delete Inference | DELETE | Generate Images |
| Delete a Project | DELETE | Projects |
| Remix Image Via URL | POST | Remix Images |
| Remix Image Via File Upload | POST | Remix Images |
| Get a Remix job by ID | GET | Remix Images |
## API Definition Endpoints
You can fetch the complete API specification for this provider:
**New Format (OpenAPI spec):**
```bash
curl 'https://backend.lowcodeapi.com/leapai/openapi'
```
**Old Format (API definition):**
```bash
curl 'https://backend.lowcodeapi.com/leapai/definition'
```
## Response Format
All responses are wrapped in a `data` key:
```json
{
"data": {
// Actual response from provider (object or array)
}
}
```