Train Brand Kit Recraft Style
curl --request POST \
--url https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style', 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://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Admin
Train Brand Kit Recraft Style
Trigger Recraft custom-style training for a brand kit.
Calls Recraft’s create-style endpoint via Fal with the kit’s
reference logos, persists the returned style_id on the kit.
Once trained, every Recraft generation for this brand will use
the custom style — the strongest brand anchor available.
Cost: ~$0.04 (one-shot). Subsequent generations are normal v3 cost.
Operator-only today. Future auto-trigger on brand_kit save is a follow-up; gated by cost concerns during early rollout. PR D of docs/plans/2026-05-14-logo-design-workflow-v2.md.
Returns:
{"style_id": "...", "trained_at": "...", "reference_image_count": N}
Errors:
- 404 — brand kit doesn’t exist
- 400 — kit has no logo URLs; training requires at least one
- 502 — Recraft / Fal error during training
POST
/
api
/
v1
/
admin
/
brand-kits
/
{brand_kit_id}
/
train-recraft-style
Train Brand Kit Recraft Style
curl --request POST \
--url https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style', 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://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Was this page helpful?