---
title: "Generate Custom Action Card Source"
method: POST
path: "/custom-action-cards/generate"
tags: ["custom-action-cards"]
---

# Generate Custom Action Card Source

`POST /custom-action-cards/generate`

## Request

- Base URL: `https://dev.whispa.net` (the document declares no server; this is the origin it was published from)
- URL: `https://dev.whispa.net/custom-action-cards/generate`
- Auth: one of:
  - OAuth 2
    - Password
    - Token URL: `auth/bearer/login`
  - API key in cookie `access_token`

Generate custom action card source code from schema and UI prompt.

## Request body

- CustomActionCardGenerateRequest: Input payload for generated card component source.
  - `name` string, required
  - `display_name` string, required
  - `description` string, required
  - `category` string, nullable
  - `input_schema` object: JSON schema used as LLM function parameters
  - `ui_prompt` string, required: Prompt describing desired UI and interaction

## Response `200`

Successful Response

- CustomActionCardGenerateResponse: Generated source code response.
  - `component_source` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/whispa/apis/whispa-api.md) - [All operations](https://skmtc.dev/whispa/apis/whispa-api/llms.txt) - [OpenAPI document](https://skmtc.dev/whispa/apis/whispa-api/revisions/12c2e4aca43c?raw)
