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

# Generate Custom Action Card Contract

`POST /custom-action-cards/generate-contract`

## 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-contract`
- Auth: one of:
  - OAuth 2
    - Password
    - Token URL: `auth/bearer/login`
  - API key in cookie `access_token`

Generate tool contract (name/description/schema/ui prompt) from intent.

## Request body

- CustomActionCardContractGenerateRequest: Input payload for generating tool contract from intent.
  - `intent_prompt` string, required: Natural-language description of what the action card should do
  - `current_name` string, nullable: Existing tool name to preserve when regenerating
  - `category` string, nullable: Preferred category hint

## Response `200`

Successful Response

- CustomActionCardContractGenerateResponse: Generated tool contract used for card creation and tool calling.
  - `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 style and behavior

## 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)
