AI
The AI API exposes AI-assisted capabilities in Pulumi Cloud. Today the surface focuses on generating Pulumi project templates from natural-language prompts.
Copilot Skill
Deprecated.
Preview. This endpoint is in preview and may change without notice.
POST
/api/ai/chat/previewPulumi Copilot skill handler for AI-powered operations.
The endpoint accepts CopilotRequest with a directSkillCall field specifying which skill to invoke and its parameters.
Example request for explainPreview skill: { “query”: “…”, “state”: { “client”: { “cloudContext”: { “orgId”: “my-org”, “url”: “https://app.pulumi.com” } } }, “directSkillCall”: { “skill”: “explainPreview”, “params”: { “pulumiPreviewOutput”: “…”, “previewDetails”: { “kind”: “update” }, “displayContext”: “cli” } } }
Request Body
Schema: CopilotRequest
querystring optionalOptional query string (rarely used for direct skill calls)- Client state wrappers leading to organization details
- Skill invocation with parameters
Responses
200
OK
Schema: CopilotResponse
- Messages in the conversation (typically from the assistant)
- ↳
roleenum optionalMessage author: ‘assistant’ (AI) or ‘user’Values:user,assistant - ↳
kindenum optionalMessage type: ‘response’ (text), ‘program’ (generated code), ‘improvedProgram’ (improved code)Values:response,program,improvedProgram - ↳
contentobject optionalThe actual message content (text string for ‘response’ kind, or structured object for ‘program’/‘improvedProgram’ kinds) errorstring optionalError message if the request faileddetailsstring optionalAdditional error context or debugging information
AI Template
Deprecated.
POST
/api/ai/templateRetired. The Pulumi AI project-generation service has been shut down, and this endpoint always returns 410 Gone. Use Pulumi Neo (https://www.pulumi.com/product/neo/) instead.
Request Body
Schema: AITemplateRequest
languagestring requiredThe programming language for the generated template (e.g. ’typescript’, ‘python’, ‘go’).instructionsstring requiredNatural language instructions describing the desired infrastructure.conversationIdstring optionalOptional identifier to continue an existing AI conversation.connectionIdstring optionalOptional identifier for the connection/session.
Responses
200
OK
Type:
object
Errors:
410 Pulumi AI project generation has been retired