Refine Run with Feedback
curl --request POST \
--url https://app.uselamina.ai/v1/runs/{runId}/feedback \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"feedback": "Make the background brighter and increase contrast on the product"
}
'import requests
url = "https://app.uselamina.ai/v1/runs/{runId}/feedback"
payload = { "feedback": "Make the background brighter and increase contrast on the product" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({feedback: 'Make the background brighter and increase contrast on the product'})
};
fetch('https://app.uselamina.ai/v1/runs/{runId}/feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.uselamina.ai/v1/runs/{runId}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feedback' => 'Make the background brighter and increase contrast on the product'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.uselamina.ai/v1/runs/{runId}/feedback"
payload := strings.NewReader("{\n \"feedback\": \"Make the background brighter and increase contrast on the product\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.uselamina.ai/v1/runs/{runId}/feedback")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"feedback\": \"Make the background brighter and increase contrast on the product\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.uselamina.ai/v1/runs/{runId}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feedback\": \"Make the background brighter and increase contrast on the product\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"runId": "99ebc7c6-24f3-4fc2-9d53-2e3f49f3bec1",
"status": "completed",
"summary": "Brightened the background and increased product contrast",
"refinedNodes": [
{
"nodeId": "designer-a",
"reason": "Background brightness and contrast adjustment"
}
],
"outputs": [
{
"id": "designer-a",
"label": "Product Hero",
"type": "image",
"value": "https://cdn.uselamina.ai/outputs/refined-hero.png"
}
],
"errorMessage": null
}
}{
"error": "<string>",
"details": [
"<string>"
]
}{
"error": "Invalid API key"
}{
"error": "App not found"
}Track
Refine Run
Iterative refinement: provide natural-language feedback on a completed run’s outputs. An LLM identifies which workflow nodes need prompt changes, re-executes them, and returns updated outputs with a summary of what changed.
Only works on runs in completed status. The refinement happens in-place on
the same run — no new run ID is created.
Example: After generating a product image, send "Make the background brighter and add more contrast" to refine the output without re-running
the entire workflow.
POST
/
v1
/
runs
/
{runId}
/
feedback
Refine Run with Feedback
curl --request POST \
--url https://app.uselamina.ai/v1/runs/{runId}/feedback \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"feedback": "Make the background brighter and increase contrast on the product"
}
'import requests
url = "https://app.uselamina.ai/v1/runs/{runId}/feedback"
payload = { "feedback": "Make the background brighter and increase contrast on the product" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({feedback: 'Make the background brighter and increase contrast on the product'})
};
fetch('https://app.uselamina.ai/v1/runs/{runId}/feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.uselamina.ai/v1/runs/{runId}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feedback' => 'Make the background brighter and increase contrast on the product'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.uselamina.ai/v1/runs/{runId}/feedback"
payload := strings.NewReader("{\n \"feedback\": \"Make the background brighter and increase contrast on the product\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.uselamina.ai/v1/runs/{runId}/feedback")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"feedback\": \"Make the background brighter and increase contrast on the product\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.uselamina.ai/v1/runs/{runId}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feedback\": \"Make the background brighter and increase contrast on the product\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"runId": "99ebc7c6-24f3-4fc2-9d53-2e3f49f3bec1",
"status": "completed",
"summary": "Brightened the background and increased product contrast",
"refinedNodes": [
{
"nodeId": "designer-a",
"reason": "Background brightness and contrast adjustment"
}
],
"outputs": [
{
"id": "designer-a",
"label": "Product Hero",
"type": "image",
"value": "https://cdn.uselamina.ai/outputs/refined-hero.png"
}
],
"errorMessage": null
}
}{
"error": "<string>",
"details": [
"<string>"
]
}{
"error": "Invalid API key"
}{
"error": "App not found"
}Iterative refinement for completed runs. Provide natural-language feedback and the engine re-executes only the nodes that need to change.
The feedback agent uses an LLM to analyze which workflow nodes (image generation, video editing, etc.) need prompt modifications to address the feedback, rewrites only those prompts, and re-executes the affected subgraph.
Use this for quality feedback loops: generate content, review it, then refine without starting over.
Authorizations
Workspace API key. Prefix: lma_. Example: lma_abc123...
Path Parameters
The run to refine.
Body
application/json
Natural-language feedback describing what to change in the outputs.
Response
Refinement result with updated outputs
Show child attributes
Show child attributes