KosmoKrator

rendering

Abyssale Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Abyssale KosmoKrator integration.

Lua Namespace

Agents call this integration through app.integrations.abyssale.*. Use lua_read_doc("integrations.abyssale") inside KosmoKrator to discover the same reference at runtime.

Call Lua from the Headless CLI

Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic Abyssale workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.abyssale.api_get({path = "example_path", params = "example_params"}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("abyssale"))' --json
kosmo integrations:lua --eval 'print(docs.read("abyssale.api_get"))' --json

Workflow file

Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.

workflow.lua
local abyssale = app.integrations.abyssale
local result = abyssale.api_get({path = "example_path", params = "example_params"})

dump(result)
Run the workflow
kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json
Namespace note. integrations:lua exposes app.integrations.abyssale, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.abyssale.default.* or app.integrations.abyssale.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need Abyssale, use the narrower mcp:lua command.

MCP Lua command
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Abyssale Lua API Reference

Namespace: app.integrations.abyssale

Use Abyssale to inspect creative designs, generate static or async media, retrieve generated files, manage projects, duplicate workspace templates, create dynamic image URLs, and request ZIP exports. Responses are decoded Abyssale JSON with no heavy reshaping.

Designs

local designs = app.integrations.abyssale.list_designs({})

local design = app.integrations.abyssale.get_design({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517"
})

local format = app.integrations.abyssale.get_design_format({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  format_specifier = "facebook-feed"
})

Read design details before generating assets. Abyssale generation payloads reference layer names and format names from the design.

Generation

Synchronous generation is for a single static image:

local image = app.integrations.abyssale.generate_image({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  template_format_name = "facebook-feed",
  elements = {
    title = { text = "Spring launch" },
    background = { background_color = "#FF0000" }
  }
})

Asynchronous generation supports multiple formats and media types:

local request = app.integrations.abyssale.generate_multi_format_media({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  template_format_names = { "facebook-feed", "instagram-post" },
  callback_url = "https://example.test/abyssale/files",
  elements = {
    title = { text = "Spring launch" }
  }
})

print(request.generation_request_id)

Omit template_format_names or pass an empty array to generate every format for the design.

Fonts, Files, And Exports

local fonts = app.integrations.abyssale.list_fonts({})

local file = app.integrations.abyssale.get_file({
  banner_id = "64238d01-d402-474b-8c2d-fbc957e9d290"
})

local export = app.integrations.abyssale.create_banner_export({
  ids = { "64238d01-d402-474b-8c2d-fbc957e9d290" },
  callback_url = "https://example.test/abyssale/export"
})

Exports are asynchronous. Abyssale posts the completed archive payload to your callback URL.

Projects And Workspace Templates

local projects = app.integrations.abyssale.list_projects({})

local project = app.integrations.abyssale.create_project({
  name = "Summer Campaign"
})

local duplicate = app.integrations.abyssale.duplicate_workspace_template({
  company_template_id = "0c967bd0-4137-4690-ad70-249aa021c68b",
  project_id = project.id,
  name = "Localized banner"
})

local status = app.integrations.abyssale.get_duplication_request({
  duplicate_request_id = duplicate.duplication_request_id
})

Duplication is asynchronous; poll the request status before trying to use the duplicated design.

Dynamic Images And Multi-Page PDFs

local dynamic = app.integrations.abyssale.create_dynamic_image_url({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  enable_rate_limit = true,
  enable_production_mode = true
})

local pdf = app.integrations.abyssale.generate_multi_page_pdf({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  callback_url = "https://example.test/abyssale/pdf",
  pages = {
    page_1 = {
      title = { text = "Page one" }
    }
  }
})

Dynamic image URLs allow query-based image customization. Multi-page PDF generation is asynchronous and returns a generation request ID.

Generic API Tools

local raw = app.integrations.abyssale.api_get({
  path = "/designs"
})

local posted = app.integrations.abyssale.api_post({
  path = "/projects",
  payload = { name = "Campaign" }
})

Use generic API tools only for documented Abyssale endpoints that do not yet have a named helper. Prefer named tools because they validate required IDs and use agent-friendly parameter names.

Webhook Payloads

Abyssale posts file and export completion events to the callback URLs you provide. Common payloads include generated file data with file.url, file.cdn_url, format, and template, or export data with export_id and archive_url.

Multi-Account Usage

app.integrations.abyssale.list_designs({})
app.integrations.abyssale.default.list_designs({})
app.integrations.abyssale.production.list_designs({})

All account namespaces expose the same tools; only stored API keys differ.

Raw agent markdown
# Abyssale Lua API Reference

Namespace: `app.integrations.abyssale`

Use Abyssale to inspect creative designs, generate static or async media, retrieve generated files, manage projects, duplicate workspace templates, create dynamic image URLs, and request ZIP exports. Responses are decoded Abyssale JSON with no heavy reshaping.

## Designs

```lua
local designs = app.integrations.abyssale.list_designs({})

local design = app.integrations.abyssale.get_design({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517"
})

local format = app.integrations.abyssale.get_design_format({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  format_specifier = "facebook-feed"
})
```

Read design details before generating assets. Abyssale generation payloads reference layer names and format names from the design.

## Generation

Synchronous generation is for a single static image:

```lua
local image = app.integrations.abyssale.generate_image({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  template_format_name = "facebook-feed",
  elements = {
    title = { text = "Spring launch" },
    background = { background_color = "#FF0000" }
  }
})
```

Asynchronous generation supports multiple formats and media types:

```lua
local request = app.integrations.abyssale.generate_multi_format_media({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  template_format_names = { "facebook-feed", "instagram-post" },
  callback_url = "https://example.test/abyssale/files",
  elements = {
    title = { text = "Spring launch" }
  }
})

print(request.generation_request_id)
```

Omit `template_format_names` or pass an empty array to generate every format for the design.

## Fonts, Files, And Exports

```lua
local fonts = app.integrations.abyssale.list_fonts({})

local file = app.integrations.abyssale.get_file({
  banner_id = "64238d01-d402-474b-8c2d-fbc957e9d290"
})

local export = app.integrations.abyssale.create_banner_export({
  ids = { "64238d01-d402-474b-8c2d-fbc957e9d290" },
  callback_url = "https://example.test/abyssale/export"
})
```

Exports are asynchronous. Abyssale posts the completed archive payload to your callback URL.

## Projects And Workspace Templates

```lua
local projects = app.integrations.abyssale.list_projects({})

local project = app.integrations.abyssale.create_project({
  name = "Summer Campaign"
})

local duplicate = app.integrations.abyssale.duplicate_workspace_template({
  company_template_id = "0c967bd0-4137-4690-ad70-249aa021c68b",
  project_id = project.id,
  name = "Localized banner"
})

local status = app.integrations.abyssale.get_duplication_request({
  duplicate_request_id = duplicate.duplication_request_id
})
```

Duplication is asynchronous; poll the request status before trying to use the duplicated design.

## Dynamic Images And Multi-Page PDFs

```lua
local dynamic = app.integrations.abyssale.create_dynamic_image_url({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  enable_rate_limit = true,
  enable_production_mode = true
})

local pdf = app.integrations.abyssale.generate_multi_page_pdf({
  design_id = "38cb7df3-1160-4824-8531-2bacde2b6517",
  callback_url = "https://example.test/abyssale/pdf",
  pages = {
    page_1 = {
      title = { text = "Page one" }
    }
  }
})
```

Dynamic image URLs allow query-based image customization. Multi-page PDF generation is asynchronous and returns a generation request ID.

## Generic API Tools

```lua
local raw = app.integrations.abyssale.api_get({
  path = "/designs"
})

local posted = app.integrations.abyssale.api_post({
  path = "/projects",
  payload = { name = "Campaign" }
})
```

Use generic API tools only for documented Abyssale endpoints that do not yet have a named helper. Prefer named tools because they validate required IDs and use agent-friendly parameter names.

## Webhook Payloads

Abyssale posts file and export completion events to the callback URLs you provide. Common payloads include generated file data with `file.url`, `file.cdn_url`, `format`, and `template`, or export data with `export_id` and `archive_url`.

## Multi-Account Usage

```lua
app.integrations.abyssale.list_designs({})
app.integrations.abyssale.default.list_designs({})
app.integrations.abyssale.production.list_designs({})
```

All account namespaces expose the same tools; only stored API keys differ.
Metadata-derived Lua example
local result = app.integrations.abyssale.api_get({path = "example_path", params = "example_params"})
print(result)

Functions

api_get Read

Call a documented Abyssale GET API path. Prefer named tools when one exists.

Lua path
app.integrations.abyssale.api_get
Full name
abyssale.abyssale_api_get
ParameterTypeRequiredDescription
path string yes API path, for example /designs.
params object no Query parameters.
api_post Read

Call a documented Abyssale POST API path. Prefer named tools when one exists.

Lua path
app.integrations.abyssale.api_post
Full name
abyssale.abyssale_api_post
ParameterTypeRequiredDescription
path string yes API path, for example /projects.
payload object no JSON request body.
create_banner_export Write

Create an asynchronous ZIP export for generated Abyssale files.

Lua path
app.integrations.abyssale.create_banner_export
Full name
abyssale.abyssale_create_banner_export
ParameterTypeRequiredDescription
ids array yes Generated banner/file IDs to export.
callback_url string no Optional callback URL for the export completion payload.
create_dynamic_image_url Write

Create or retrieve a dynamic image URL for an Abyssale design.

Lua path
app.integrations.abyssale.create_dynamic_image_url
Full name
abyssale.abyssale_create_dynamic_image_url
ParameterTypeRequiredDescription
design_id string yes The Abyssale design UUID.
enable_rate_limit boolean no Enable per-query rate limiting for the dynamic image.
enable_production_mode boolean no Enable production mode for the dynamic image.
create_project Write

Create a project in the Abyssale workspace.

Lua path
app.integrations.abyssale.create_project
Full name
abyssale.abyssale_create_project
ParameterTypeRequiredDescription
name string yes Project name, 2 to 100 characters.
duplicate_workspace_template Write

Duplicate a workspace template into a project.

Lua path
app.integrations.abyssale.duplicate_workspace_template
Full name
abyssale.abyssale_duplicate_workspace_template
ParameterTypeRequiredDescription
company_template_id string yes Workspace template UUID.
project_id string yes Target project UUID.
name string no Optional custom name for the duplicated design.
generate_image Read

Synchronously generate a single image from a static Abyssale design.

Lua path
app.integrations.abyssale.generate_image
Full name
abyssale.abyssale_generate_image
ParameterTypeRequiredDescription
design_id string yes The Abyssale design UUID.
elements object yes Element overrides keyed by layer name.
template_format_name string no Optional format name when the design has multiple formats.
generate_multi_format_media Read

Asynchronously generate one or more formats from an Abyssale design.

Lua path
app.integrations.abyssale.generate_multi_format_media
Full name
abyssale.abyssale_generate_multi_format_media
ParameterTypeRequiredDescription
design_id string yes The Abyssale design UUID.
elements object yes Element overrides keyed by layer name.
template_format_names array no Format names to generate. Omit or pass an empty array for all formats.
callback_url string no Optional callback URL for the completed generation payload.
generate_multi_page_pdf Read

Asynchronously generate a multi-page PDF from an Abyssale design.

Lua path
app.integrations.abyssale.generate_multi_page_pdf
Full name
abyssale.abyssale_generate_multi_page_pdf
ParameterTypeRequiredDescription
design_id string yes The Abyssale design UUID.
pages object no Page overrides keyed by page or layer name.
callback_url string no Optional callback URL for the completed PDF payload.
get_design Read

Get an Abyssale design with its metadata, formats, and editable elements.

Lua path
app.integrations.abyssale.get_design
Full name
abyssale.abyssale_get_design
ParameterTypeRequiredDescription
design_id string yes The Abyssale design UUID.
get_design_format Read

Get details for a specific format inside an Abyssale design.

Lua path
app.integrations.abyssale.get_design_format
Full name
abyssale.abyssale_get_design_format
ParameterTypeRequiredDescription
design_id string yes The Abyssale design UUID.
format_specifier string yes The format ID or format name.
get_duplication_request Read

Get the status of a workspace-template duplication request.

Lua path
app.integrations.abyssale.get_duplication_request
Full name
abyssale.abyssale_get_duplication_request
ParameterTypeRequiredDescription
duplicate_request_id string yes Duplication request UUID.
get_file Read

Get a generated Abyssale file by banner ID.

Lua path
app.integrations.abyssale.get_file
Full name
abyssale.abyssale_get_file
ParameterTypeRequiredDescription
banner_id string yes The generated banner/file UUID.
list_designs Read

List Abyssale designs available to the API key.

Lua path
app.integrations.abyssale.list_designs
Full name
abyssale.abyssale_list_designs
ParameterTypeRequiredDescription
No parameters.
list_fonts Read

List custom and Google fonts available to the Abyssale workspace.

Lua path
app.integrations.abyssale.list_fonts
Full name
abyssale.abyssale_list_fonts
ParameterTypeRequiredDescription
No parameters.
list_projects Read

List projects in the Abyssale workspace.

Lua path
app.integrations.abyssale.list_projects
Full name
abyssale.abyssale_list_projects
ParameterTypeRequiredDescription
No parameters.