curl --request POST \
--url https://api.moda.app/v1/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"user_request_quote": "<string>",
"conversation_id": "conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"canvas_id": "cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"template_canvas_id": "cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"canvas_name": "<string>",
"brand_kit_id": "bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"skip_brand_kit": false,
"callback_url": "<string>",
"idempotency_key": "<string>",
"attachments": [
{
"url": "<string>",
"name": "<string>",
"type": "image"
}
],
"format": {
"width": 123,
"height": 123,
"label": "<string>",
"page_count": 2
},
"reference_canvas_ids": [
"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
],
"number_of_slides": 2,
"export_on_complete": {
"enabled": true,
"pixel_ratio": 2
}
}
'import requests
url = "https://api.moda.app/v1/tasks"
payload = {
"prompt": "<string>",
"user_request_quote": "<string>",
"conversation_id": "conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"canvas_id": "cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"template_canvas_id": "cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"canvas_name": "<string>",
"brand_kit_id": "bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"skip_brand_kit": False,
"callback_url": "<string>",
"idempotency_key": "<string>",
"attachments": [
{
"url": "<string>",
"name": "<string>",
"type": "image"
}
],
"format": {
"width": 123,
"height": 123,
"label": "<string>",
"page_count": 2
},
"reference_canvas_ids": ["cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV"],
"number_of_slides": 2,
"export_on_complete": {
"enabled": True,
"pixel_ratio": 2
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
user_request_quote: '<string>',
conversation_id: 'conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
canvas_id: 'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
template_canvas_id: 'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
canvas_name: '<string>',
brand_kit_id: 'bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
skip_brand_kit: false,
callback_url: '<string>',
idempotency_key: '<string>',
attachments: [{url: '<string>', name: '<string>', type: 'image'}],
format: {width: 123, height: 123, label: '<string>', page_count: 2},
reference_canvas_ids: ['cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV'],
number_of_slides: 2,
export_on_complete: {enabled: true, pixel_ratio: 2}
})
};
fetch('https://api.moda.app/v1/tasks', 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.moda.app/v1/tasks",
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([
'prompt' => '<string>',
'user_request_quote' => '<string>',
'conversation_id' => 'conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
'canvas_id' => 'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
'template_canvas_id' => 'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
'canvas_name' => '<string>',
'brand_kit_id' => 'bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
'skip_brand_kit' => false,
'callback_url' => '<string>',
'idempotency_key' => '<string>',
'attachments' => [
[
'url' => '<string>',
'name' => '<string>',
'type' => 'image'
]
],
'format' => [
'width' => 123,
'height' => 123,
'label' => '<string>',
'page_count' => 2
],
'reference_canvas_ids' => [
'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV'
],
'number_of_slides' => 2,
'export_on_complete' => [
'enabled' => true,
'pixel_ratio' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.moda.app/v1/tasks"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"user_request_quote\": \"<string>\",\n \"conversation_id\": \"conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"template_canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_name\": \"<string>\",\n \"brand_kit_id\": \"bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"skip_brand_kit\": false,\n \"callback_url\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"image\"\n }\n ],\n \"format\": {\n \"width\": 123,\n \"height\": 123,\n \"label\": \"<string>\",\n \"page_count\": 2\n },\n \"reference_canvas_ids\": [\n \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\"\n ],\n \"number_of_slides\": 2,\n \"export_on_complete\": {\n \"enabled\": true,\n \"pixel_ratio\": 2\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.moda.app/v1/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"user_request_quote\": \"<string>\",\n \"conversation_id\": \"conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"template_canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_name\": \"<string>\",\n \"brand_kit_id\": \"bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"skip_brand_kit\": false,\n \"callback_url\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"image\"\n }\n ],\n \"format\": {\n \"width\": 123,\n \"height\": 123,\n \"label\": \"<string>\",\n \"page_count\": 2\n },\n \"reference_canvas_ids\": [\n \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\"\n ],\n \"number_of_slides\": 2,\n \"export_on_complete\": {\n \"enabled\": true,\n \"pixel_ratio\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moda.app/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"user_request_quote\": \"<string>\",\n \"conversation_id\": \"conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"template_canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_name\": \"<string>\",\n \"brand_kit_id\": \"bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"skip_brand_kit\": false,\n \"callback_url\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"image\"\n }\n ],\n \"format\": {\n \"width\": 123,\n \"height\": 123,\n \"label\": \"<string>\",\n \"page_count\": 2\n },\n \"reference_canvas_ids\": [\n \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\"\n ],\n \"number_of_slides\": 2,\n \"export_on_complete\": {\n \"enabled\": true,\n \"pixel_ratio\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "task_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"kind": "design",
"status": "queued",
"attempt": 123,
"max_attempts": 123,
"attempts_started": 123,
"links": {
"self": "<string>",
"events": "<string>",
"cancel": "<string>",
"canvas": "<string>"
},
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"progress": {
"percent": 123,
"step": "<string>",
"message": "<string>"
},
"first_started_at": "<string>",
"input": {},
"result": {
"canvas_id": "<string>",
"canvas_url": "<string>",
"canvas_name": "<string>",
"conversation_id": "<string>",
"source_canvas_id": "<string>",
"source_canvas_url": "<string>",
"theme_canvas_id": "<string>",
"export": {
"url": "<string>",
"format": "<string>",
"status": "<string>",
"page_count": 123
}
},
"error": {},
"credits": {
"credits_used": 123,
"credits_remaining": 123
},
"retry_after_ms": 123
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}Start Design Task
Start an AI design task. Returns immediately with a task ID for polling.
curl --request POST \
--url https://api.moda.app/v1/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"user_request_quote": "<string>",
"conversation_id": "conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"canvas_id": "cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"template_canvas_id": "cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"canvas_name": "<string>",
"brand_kit_id": "bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"skip_brand_kit": false,
"callback_url": "<string>",
"idempotency_key": "<string>",
"attachments": [
{
"url": "<string>",
"name": "<string>",
"type": "image"
}
],
"format": {
"width": 123,
"height": 123,
"label": "<string>",
"page_count": 2
},
"reference_canvas_ids": [
"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
],
"number_of_slides": 2,
"export_on_complete": {
"enabled": true,
"pixel_ratio": 2
}
}
'import requests
url = "https://api.moda.app/v1/tasks"
payload = {
"prompt": "<string>",
"user_request_quote": "<string>",
"conversation_id": "conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"canvas_id": "cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"template_canvas_id": "cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"canvas_name": "<string>",
"brand_kit_id": "bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"skip_brand_kit": False,
"callback_url": "<string>",
"idempotency_key": "<string>",
"attachments": [
{
"url": "<string>",
"name": "<string>",
"type": "image"
}
],
"format": {
"width": 123,
"height": 123,
"label": "<string>",
"page_count": 2
},
"reference_canvas_ids": ["cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV"],
"number_of_slides": 2,
"export_on_complete": {
"enabled": True,
"pixel_ratio": 2
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
user_request_quote: '<string>',
conversation_id: 'conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
canvas_id: 'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
template_canvas_id: 'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
canvas_name: '<string>',
brand_kit_id: 'bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
skip_brand_kit: false,
callback_url: '<string>',
idempotency_key: '<string>',
attachments: [{url: '<string>', name: '<string>', type: 'image'}],
format: {width: 123, height: 123, label: '<string>', page_count: 2},
reference_canvas_ids: ['cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV'],
number_of_slides: 2,
export_on_complete: {enabled: true, pixel_ratio: 2}
})
};
fetch('https://api.moda.app/v1/tasks', 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.moda.app/v1/tasks",
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([
'prompt' => '<string>',
'user_request_quote' => '<string>',
'conversation_id' => 'conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
'canvas_id' => 'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
'template_canvas_id' => 'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
'canvas_name' => '<string>',
'brand_kit_id' => 'bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV',
'skip_brand_kit' => false,
'callback_url' => '<string>',
'idempotency_key' => '<string>',
'attachments' => [
[
'url' => '<string>',
'name' => '<string>',
'type' => 'image'
]
],
'format' => [
'width' => 123,
'height' => 123,
'label' => '<string>',
'page_count' => 2
],
'reference_canvas_ids' => [
'cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV'
],
'number_of_slides' => 2,
'export_on_complete' => [
'enabled' => true,
'pixel_ratio' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.moda.app/v1/tasks"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"user_request_quote\": \"<string>\",\n \"conversation_id\": \"conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"template_canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_name\": \"<string>\",\n \"brand_kit_id\": \"bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"skip_brand_kit\": false,\n \"callback_url\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"image\"\n }\n ],\n \"format\": {\n \"width\": 123,\n \"height\": 123,\n \"label\": \"<string>\",\n \"page_count\": 2\n },\n \"reference_canvas_ids\": [\n \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\"\n ],\n \"number_of_slides\": 2,\n \"export_on_complete\": {\n \"enabled\": true,\n \"pixel_ratio\": 2\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.moda.app/v1/tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"user_request_quote\": \"<string>\",\n \"conversation_id\": \"conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"template_canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_name\": \"<string>\",\n \"brand_kit_id\": \"bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"skip_brand_kit\": false,\n \"callback_url\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"image\"\n }\n ],\n \"format\": {\n \"width\": 123,\n \"height\": 123,\n \"label\": \"<string>\",\n \"page_count\": 2\n },\n \"reference_canvas_ids\": [\n \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\"\n ],\n \"number_of_slides\": 2,\n \"export_on_complete\": {\n \"enabled\": true,\n \"pixel_ratio\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moda.app/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"user_request_quote\": \"<string>\",\n \"conversation_id\": \"conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"template_canvas_id\": \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"canvas_name\": \"<string>\",\n \"brand_kit_id\": \"bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV\",\n \"skip_brand_kit\": false,\n \"callback_url\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"image\"\n }\n ],\n \"format\": {\n \"width\": 123,\n \"height\": 123,\n \"label\": \"<string>\",\n \"page_count\": 2\n },\n \"reference_canvas_ids\": [\n \"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV\"\n ],\n \"number_of_slides\": 2,\n \"export_on_complete\": {\n \"enabled\": true,\n \"pixel_ratio\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "task_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"kind": "design",
"status": "queued",
"attempt": 123,
"max_attempts": 123,
"attempts_started": 123,
"links": {
"self": "<string>",
"events": "<string>",
"cancel": "<string>",
"canvas": "<string>"
},
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"progress": {
"percent": 123,
"step": "<string>",
"message": "<string>"
},
"first_started_at": "<string>",
"input": {},
"result": {
"canvas_id": "<string>",
"canvas_url": "<string>",
"canvas_name": "<string>",
"conversation_id": "<string>",
"source_canvas_id": "<string>",
"source_canvas_url": "<string>",
"theme_canvas_id": "<string>",
"export": {
"url": "<string>",
"format": "<string>",
"status": "<string>",
"page_count": 123
}
},
"error": {},
"credits": {
"credits_used": 123,
"credits_remaining": 123
},
"retry_after_ms": 123
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}Authorizations
API key from Settings > Developer > REST API
Headers
Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.
2026-04-12, 2026-05-01 "2026-05-01"
Body
Natural-language description of the design task for the AI agent.
For an agent handing work to Moda's agent on a user's behalf: the user's own words naming Moda as the ACTOR ("have the Moda agent design it"), quoted verbatim. Recorded on the usage event so the delegation decision is auditable. Not validated and not interpreted — it grounds the decision, it does not gate it. Optional here (the app and existing API integrations start their own tasks and have no user to quote); the agent surfaces that expose delegation as a choice — moda task submit and the connector's task_delegate — require it.
Prefixed conv_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working), as is the prefix over a UUID body (conv_00000000-0000-4000-8000-000000000000). All three are permanent, supported inputs; only the canonical form is ever emitted.
^conv_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$"conv_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
Prefixed cvs_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working), as is the prefix over a UUID body (cvs_00000000-0000-4000-8000-000000000000). All three are permanent, supported inputs; only the canonical form is ever emitted.
^cvs_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
Prefixed cvs_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working), as is the prefix over a UUID body (cvs_00000000-0000-4000-8000-000000000000). All three are permanent, supported inputs; only the canonical form is ever emitted.
^cvs_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
Name for the new canvas. Used when creating (canvas_id omitted) or when remixing via template_canvas_id (overrides the default Remix of <source>).
Prefixed bk_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working), as is the prefix over a UUID body (bk_00000000-0000-4000-8000-000000000000). All three are permanent, supported inputs; only the canonical form is ever emitted.
^bk_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$"bk_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
If true, no brand kit is applied — every brand-kit source is suppressed, including the canvas's own kit, the team default, and any explicit brand_kit_id override. Use only when the design must be unbranded; to merely leave the canvas's existing kit alone, omit brand_kit_id instead.
HTTPS URL to receive a webhook POST when the job completes, fails, or is cancelled. See the Webhooks documentation for payload format and signature verification.
Client-generated unique key to prevent duplicate job creation. If a job with this key already exists, its status is returned instead of creating a new one.
List of reference images or files for the AI agent to use as inspiration. Each item is either a URL-shape attachment ({url, name?, type?}) or a file-id-shape attachment ({file_id, role, label?}) referencing a file previously uploaded via POST /v1/uploads. The two shapes are distinguished by their required fields (url vs file_id).
- AttachmentInput
- FileAttachment
Show child attributes
Show child attributes
Canvas format and dimensions. Controls the output size and layout type (e.g. slides, social media, custom).
Show child attributes
Show child attributes
AI model tier: 'pro' (best for complex tasks), 'pro-fast' (the same quality as Pro with faster output and higher credit usage), 'fable-5.1' (Claude Fable 5.1 at low effort; premium plans only), 'standard', 'lite', 'kimi-k2.5' (Fireworks-hosted Kimi K2.5), 'kimi-k2.6' (Fireworks-hosted Kimi K2.6), 'kimi-k3' (Moonshot-hosted Kimi K3), or 'gpt-5.6' (OpenAI GPT-5.6 at high reasoning). Defaults to automatic selection based on task complexity.
pro, pro-fast, fable-5.1, standard, lite, kimi-k2.5, kimi-k2.6, kimi-k3, gpt-5.6 List of prefixed cvs_ IDs to use as design inspiration. The agent can see these designs and reference their style, layout, or content.
Prefixed cvs_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working), as is the prefix over a UUID body (cvs_00000000-0000-4000-8000-000000000000). All three are permanent, supported inputs; only the canonical form is ever emitted.
^cvs_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$Optional maximum number of slides for slide-generation jobs. When omitted for slides, Moda defaults to an 8-slide target and clamps to your plan limit. Rejected with a role='import' attachment — an existing-deck edit keeps the deck's own slide count.
x >= 1Auto-export preferences applied when the task finishes. The finished design is rendered to result.export (and the completion webhook), so a follow-up POST /v1/canvases/{id}/export for the same canvas hits the cache instead of re-rendering. Omit to use the canvas category default (slides→PPTX, pdf→PDF, others→PNG); pass {enabled: false} to opt out of the auto-export entirely. Multi-page PNG/JPEG bundles into a .zip of per-page files; result.export.format reflects what was actually delivered (png, jpeg, pdf, pptx, or zip).
Show child attributes
Show child attributes
Response
Successful Response
Canonical wire-format for every async design operation.
All consumers -- REST, webhooks, SSE, MCP -- serialize through
Task.from_db() so the shape is always consistent.
Prefixed task_... identifier.
^task_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$"task_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
Discriminator for the kind-specific result payload.
design, export, remix, brand_kit_extract, layerize_assets Current lifecycle status.
queued, running, succeeded, failed, canceled, expired Current attempt number (1-based).
Maximum attempts before dead-lettering.
Number of attempts STARTED (claimed by a worker) — never attempts completed. 0 means the task has never been claimed. The claim itself increments the counter, so a task on its first attempt reports 1 while RUNNING and stays at 1 through that attempt's retry backoff. The retry signal is therefore status == "queued" && attempts_started >= 1 (a queued task that has already burned an attempt), NOT >= 2. Unlike attempt, this is the raw counter and is not floored to 1.
HATEOAS links for this task.
Show child attributes
Show child attributes
ISO 8601 timestamp.
ISO 8601 timestamp.
ISO 8601 timestamp.
Live progress for running tasks. Null when not applicable.
Show child attributes
Show child attributes
ISO 8601 timestamp of when the FIRST attempt was claimed. null means unknown — either the task has never started, or it predates this field being recorded. started_at remains the CURRENT attempt's start, so on a retried task the two differ and the gap is the real wall-clock age of the work.
Sanitized echo of the original request.
Result payload of a design or remix task.
Populated when status is succeeded, and partially populated for
some in-flight tasks (a remix surfaces its source canvas before the design
task finishes). Extra keys are permitted so synchronous-completion payloads
pass through without schema churn.
- TaskResult
- PublicLayerizeAssetsResult
Show child attributes
Show child attributes
Error info: {message, retryable, attempt}. Present for failed tasks, and also for a NON-terminal task that carries an error from an earlier attempt — on a non-terminal task this always describes the PREVIOUS, already-dead attempt, never the one currently in flight. attempt is the attempts_started value the error is tied to (0 when the failure happened before any claim).
Credit usage. Present only for completed tasks when billing is enabled.
Show child attributes
Show child attributes
Suggested milliseconds to wait before the next poll. Null for terminal tasks.