AI
AI Template
/api/ai/templateGenerates a Pulumi template using the Pulumi AI service.
Request Body
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
List Org Conversations
/api/orgs/{orgName}/ai/conversationsLists all Pulumi Copilot conversations across an entire organization.
Request Parameters
orgNamestring path requiredThe organization namepageinteger query optionalPage number for paginationpageSizeinteger query optionalNumber of results per page
Responses
- The list of conversations
- ↳
idstring requiredThe unique identifier - ↳
createdstring requiredThe creation timestamp - ↳
titlestring requiredThe title - ↳
summarystring requiredThe summary
List Conversations
/api/orgs/{orgName}/ai/conversations/{userLogin}Lists all Pulumi Copilot conversations for a specific user within an organization.
Request Parameters
orgNamestring path requiredThe organization nameuserLoginstring path requiredThe user login namepageinteger query optionalPage number for paginationpageSizeinteger query optionalNumber of results per page
Responses
- The list of conversations
- ↳
idstring requiredThe unique identifier - ↳
createdstring requiredThe creation timestamp - ↳
titlestring requiredThe title - ↳
summarystring requiredThe summary
Create Conversation
/api/orgs/{orgName}/ai/conversations/{userLogin}Creates a new Pulumi Copilot conversation for the specified user.
Request Parameters
orgNamestring path requiredThe organization nameuserLoginstring path requiredThe user login name
Request Body
conversation_idstring requiredUnique identifier for the conversation, provided by the client.originstring optionalThe origin
Responses
Get Conversation
/api/orgs/{orgName}/ai/conversations/{userLogin}/{conversationID}Retrieves the details and messages of a Pulumi Copilot conversation.
Request Parameters
orgNamestring path requiredThe organization nameuserLoginstring path requiredThe user login nameconversationIDstring path requiredThe unique identifier of the Pulumi Copilot conversationpageinteger query optionalPage number for paginationpageSizeinteger query optionalNumber of results per page
Responses
- The conversation details
- ↳
idstring requiredThe unique identifier - ↳
createdstring requiredThe creation timestamp - ↳
titlestring requiredThe title - ↳
summarystring requiredThe summary - The messages in the conversation
- ↳
idstring requiredThe unique identifier of the message. - ↳
createdstring requiredThe timestamp when the message was created, in ISO 8601 format. - ↳
modelstring requiredThe AI model used to generate this message. - ↳
rolestring requiredThe role of the message author (e.g. user, assistant). - ↳
messagestring requiredThe text body of the message. - ↳
message_schema_versionstring requiredThe schema version of the message format. - ↳
skillsstring requiredA JSON-encoded string of skill invocations associated with this message. - ↳
parent_conversation_message_idstring requiredThe ID of the parent conversation message, if this is a reply.
Patch Conversation
/api/orgs/{orgName}/ai/conversations/{userLogin}/{conversationID}Updates properties of an existing Pulumi Copilot conversation.
Request Parameters
orgNamestring path requiredThe organization nameuserLoginstring path requiredThe user login nameconversationIDstring path requiredThe unique identifier of the Pulumi Copilot conversation
Request Body
titlestring requiredThe updated title of the conversation.summarystring requiredThe updated summary of the conversation.
Responses
Submit Feedback
/api/orgs/{orgName}/ai/conversations/{userLogin}/{conversationID}/feedbackSubmits user feedback on a Pulumi Copilot conversation.
Request Parameters
orgNamestring path requiredThe organization nameuserLoginstring path requiredThe user login nameconversationIDstring path requiredThe unique identifier of the Pulumi Copilot conversation
Request Body
feedbackKindenum requiredThe kind of feedback (thumbs up or thumbs down).Values:thumbsup,thumbsdowncommentstring requiredA comment providing additional details about the feedback.
Responses
Append Message To Conversation
/api/orgs/{orgName}/ai/conversations/{userLogin}/{conversationID}/messagesAppends a new message to an existing Pulumi Copilot conversation.
Request Parameters
orgNamestring path requiredThe organization nameuserLoginstring path requiredThe user login nameconversationIDstring path requiredThe unique identifier of the Pulumi Copilot conversation
Request Body
modelstring requiredThe AI model to use for generating the response (e.g. ‘gpt-4’, ‘claude-3’).messagestring requiredThe message text to append to the conversation.message_schema_versionstring requiredSchema version of the message format, for forward/backward compatibility.skillsstring requiredComma-separated list of skill identifiers to enable for this message.rolestring requiredThe role of the message sender (e.g. ‘user’, ‘assistant’, ‘system’).
Responses
Fetch Program
/api/orgs/{orgName}/ai/conversations/{userLogin}/{conversationID}/programs/{programID}.zipFetches a template program as a zip file.
Request Parameters
orgNamestring path requiredThe organization nameuserLoginstring path requiredThe user login nameconversationIDstring path requiredThe unique identifier of the Pulumi Copilot conversationprogramIDstring path requiredThe identifier of the generated template program to download
Responses
Get Sent Message Count For User
/api/user/ai/usageReturns the number of AI messages sent by the authenticated user. An optional lookback duration can be specified to limit the count to a recent time window.
Request Parameters
lookbackDurationinteger query optionalDuration in seconds to look back for messages. Must be positive if provided.
Responses
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.