Skip to main content

Update App

Endpoint: Update App

This endpoint allows users to update the configuration, workflow, name, or description of an existing app on the RunGen.AI platform. The app is identified by its unique app_id, and partial updates are supported, meaning only the fields specified in the request body will be updated.

URL

PUT https://api.rungen.ai/app/{app_id}

Path Parameters

ParameterTypeRequiredDescription
app_idStringYesThe unique identifier of the app to be updated.

Headers

HeaderTypeRequiredDescription
x-api-keyStringYesYour API key for authentication.
Content-TypeStringYesThe content type of the request (application/json).
x-team-idStringNoThe unique identifier for the team associated with the app.

Request Body

FieldTypeRequiredDescription
nameStringNoThe new name of the app.
descriptionStringNoThe new description of the app.
configurationObjectNoUpdated configuration details for the app.
configuration.active_workersIntegerNoThe number of active workers for the app.
workflowObjectNoUpdated workflow settings for the app.
workflow.model_urlStringNoThe new model URL for the app's workflow.
workflow.toolsObjectNoUpdated tools for the workflow.
workflow.tools.lorasArrayNoList of LoRAs (Low-Rank Adaptation) to fine-tune the model.

LoRA Configuration (Optional)

warning

The update-app request allows modifications only to the weights specified for LoRAs.

If you want to update weights of LoRAs, include them in the workflow.tools.loras field. Pass the same LoRA specification you used to create the app, with the same properties:

FieldTypeRequiredDescription
idStringYesUnique identifier for the LoRA.
versionIdStringYesVersion ID of the LoRA.
downloadUrlStringYesURL to download the LoRA.
nameStringYesHuman-readable name of the LoRA.
weightFloatYesThe weight or influence of the LoRA on the model.

Notes on LoRA Updates:

  • If no changes are needed for LoRAs, omit the workflow.tools.loras field to leave them unchanged.

Example Request with LoRAs

curl --location --request PUT 'https://api.rungen.ai/app/745f7dc0-cd5a-488e-98ce-7d48c624060a' \
--header 'x-api-key: 123456789abc' \
--header 'Content-Type: application/json' \
--data '{
"configuration": {
"active_workers": 1
},
"workflow": {
"model_url": "https://huggingface.co/black-forest-labs/FLUX.1-schnell",
"tools": {
"loras": [
{
"id": "212532",
"versionId": "244808",
"downloadUrl": "https://civitai.com/api/download/models/244808",
"name": "All Disney Princess XL LoRA Model",
"weight": 0.9
},
{
"id": "200255",
"versionId": "997426",
"downloadUrl": "https://civitai.com/api/download/models/997426",
"name": "Hands XL LoRA",
"weight": 0.8
}
]
}
}
}'

Response

Success

Status Code: 201 Created

Response Body:

{
"id": "745f7dc0-cd5a-488e-98ce-7d48c624060a",
"name": "Updated app with LoRAs",
"configuration": {
"gpu_tier": "STANDARD",
"active_workers": 1,
},
"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.9
},
{
"id": "200255",
"name": "Hands XL LoRA",
"weight": 0.8
}
]
}
},
"team_id": "team-id",
"user_id": "user-id"
}

Notes

  • Partial Updates: You only need to include fields you want to modify. Fields not included in the request will remain unchanged.
  • Weights for existing LoRAs can also be adjusted to fine-tune their influence on the model’s output.