Skip to main content
Pulumi logo Pulumi logo
  1. Docs
  2. Reference
  3. REST API Docs
  4. AI

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/preview

    Pulumi 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

    • query string optional
      Optional query string (rarely used for direct skill calls)
    • state CopilotState required
      Client state wrappers leading to organization details
    • directSkillCall CopilotDirectSkillCall optional
      Skill invocation with parameters

    Responses

    200 OK
    • messages array[CopilotMessage] optional
      Messages in the conversation (typically from the assistant)
    • ↳ role enum optional
      Message author: ‘assistant’ (AI) or ‘user’
      Values: user, assistant
    • ↳ kind enum optional
      Message type: ‘response’ (text), ‘program’ (generated code), ‘improvedProgram’ (improved code)
      Values: response, program, improvedProgram
    • ↳ content object optional
      The actual message content (text string for ‘response’ kind, or structured object for ‘program’/‘improvedProgram’ kinds)
    • error string optional
      Error message if the request failed
    • details string optional
      Additional error context or debugging information

    AI Template

    ▼
    Deprecated.
    POST /api/ai/template

    Retired. 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

    • language string required
      The programming language for the generated template (e.g. ’typescript’, ‘python’, ‘go’).
    • instructions string required
      Natural language instructions describing the desired infrastructure.
    • conversationId string optional
      Optional identifier to continue an existing AI conversation.
    • connectionId string optional
      Optional identifier for the connection/session.

    Responses

    200 OK
    Type: object
    Errors: 410 Pulumi AI project generation has been retired

      The infrastructure as code platform for any cloud.