Create App
Endpoint: Create App
This endpoint allows you to create a new app on the RunGen.AI platform.
URL
POST https://api.rungen.ai/app
Headers
Header | Type | Required | Description |
---|---|---|---|
x-api-key | String | Yes | Your API key for authentication. |
Content-Type | String | Yes | The content type of the request (application/json ). |
x-team-id | String | No | The unique identifier for the team creating the app. |
Request Body
Field | Type | Required | Description |
---|---|---|---|
name | String | Yes | The name of the app. |
description | String | No | A description of the app. |
configuration | Object | Yes | Configuration details for the app. |
configuration.gpu_tier | String | Yes | GPU identifiers for the app (BASIC , STANDARD , PERFORMANCE ). |
configuration.active_workers | Integer | No | Number of active workers. |
configuration.location | String | No | Location of the app. |
workflow | Object | Yes | Workflow settings for the app. |
workflow.model_url | String | Yes | URL of the model used in the workflow. |
workflow.tools | Object | No | Additional tools for the workflow. |
workflow.tools.loras | Array | No | A list of LoRAs (Low-Rank Adaptation) to fine-tune the model. |
LoRA Configuration (Optional)
If you want to use LoRAs with your app, include them in the workflow.tools.loras
field. Each LoRA should have the following properties:
Field | Type | Required | Description |
---|---|---|---|
id | String | Yes | Unique identifier for the LoRA. |
versionId | String | Yes | Version ID of the LoRA. |
downloadUrl | String | Yes | URL to download the LoRA. |
name | String | Yes | Human-readable name of the LoRA. |
weight | Float | Yes | The weight or influence of the LoRA on the model. |
Example Request with LoRAs
curl --location 'https://api.rungen.ai/app' \
--header 'x-api-key: 12345678890abc' \
--header 'Content-Type: application/json' \
--data '{
"name": "My first app",
"description": "This is my first app",
"configuration": {
"gpu_tier": "STANDARD"
},
"workflow": {
"model_url": "https://huggingface.co/black-forest-labs/FLUX.1-dev",
"tools": {
"loras": [
{
"id": "212532",
"versionId": "244808",
"downloadUrl": "https://civitai.com/api/download/models/244808",
"name": "All Disney Princess XL LoRA Model",
"weight": 0.8
},
{
"id": "200255",
"versionId": "997426",
"downloadUrl": "https://civitai.com/api/download/models/997426",
"name": "Hands XL LoRA",
"weight": 0.7
}
]
}
}
}'
Response
Success
Status Code: 201 Created
Response Body:
{
"id": "unique-app-id",
"name": "My first app",
"description": "This is my first app",
"configuration": {
"gpu_tier": "STANDARD",
"active_workers": null,
"location": null
},
"workflow": {
"model_url": "https://huggingface.co/black-forest-labs/FLUX.1-schnell",
"tools": {
"loras": [
{
"id": "212532",
"name": "All Disney Princess XL LoRA Model",
"weight": 0.8
},
{
"id": "200255",
"name": "Hands XL LoRA",
"weight": 0.7
}
]
}
},
"team_id": "team-id",
"user_id": "user-id"
}
Error
Status Code: 400 Bad Request
Example Response Body:
{
"error": "Invalid request body. Missing required field: 'name'."
}
Status Code: 403 Forbidden
Example Response Body:
{
"error": "Unauthorized access. Invalid API key."
}