Automattic AI API

The ai API from Automattic — 17 operation(s) for ai.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 19

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /wpcom/v2/ai/agent/{agent_id} Create an AI agent · POST /wpcom/v2/ai/agent/{agent_id} #
Ask an LLM
“Can I create a new AI agent for my site?”
“What do I need to set up an agent?”
Tell an agent
Create an AI agent {agent_id}.
Set up agent {agent_id} with its configuration.
GET /wpcom/v2/ai/agent/{agent_id}/sites List sites an AI agent is on · GET /wpcom/v2/ai/agent/{agent_id}/sites #
Ask an LLM
“Which sites has a particular AI agent been added to?”
“Can I see every site an agent is connected to?”
Tell an agent
List the sites that agent {agent_id} is on.
Show which sites agent {agent_id} has been added to.
GET /wpcom/v2/ai/bots List AI bots · GET /wpcom/v2/ai/bots #
Ask an LLM
“What AI bots are available?”
“Can I search bots by slug or description?”
Tell an agent
List all AI bots.
Find bots whose slug or description contains {search}.
POST /wpcom/v2/ai/bots Create an AI bot from YAML · POST /wpcom/v2/ai/bots #
Ask an LLM
“How do I create an AI bot from a YAML configuration?”
“Can I set a bot's visibility and status when creating it?”
Tell an agent
Create an AI bot {slug_suffix} in {product} with YAML {yaml} and status {status}.
Add a new bot {slug_suffix} owned by {team} with visibility {visibility}.
GET /wpcom/v2/ai/bots/{slug} Get an AI bot's default version · GET /wpcom/v2/ai/bots/{slug} #
Ask an LLM
“What does a specific AI bot's default version contain?”
“Can I fetch one bot's active version by slug?”
Tell an agent
Get the default version of bot {slug}.
Show the active version of bot {slug}.
GET /wpcom/v2/ai/bots/{slug}/versions List an AI bot's versions · GET /wpcom/v2/ai/bots/{slug}/versions #
Ask an LLM
“Which versions exist for a given AI bot?”
“Can I include archived bot versions in the list?”
Tell an agent
List all versions of bot {slug}.
Show bot {slug} versions, including archived ones ({include_archived}).
POST /wpcom/v2/ai/bots/{slug}/versions Create a new version of an AI bot · POST /wpcom/v2/ai/bots/{slug}/versions #
Ask an LLM
“How do I add a new version to an existing AI bot?”
“Can I describe a bot version and set its status?”
Tell an agent
Create version {new_version} of bot {slug} with YAML {yaml} and status {status}.
Add bot {slug} version {new_version} described as {description}.
GET /wpcom/v2/ai/bots/{slug}/versions/{version} Get a specific AI bot version · GET /wpcom/v2/ai/bots/{slug}/versions/{version} #
Ask an LLM
“What does a particular version of an AI bot contain?”
“Can I fetch one bot version by its number?”
Tell an agent
Get version {version} of bot {slug}.
Show the {version} configuration of bot {slug}.
POST /wpcom/v2/ai/bots/{slug}/versions/{version}/status Change a bot version's status · POST /wpcom/v2/ai/bots/{slug}/versions/{version}/status #
Ask an LLM
“How do I archive or activate a bot version?”
“Can I record a reason when changing a bot version's status?”
Tell an agent
Set bot {slug} version {version} status to {new_status} because {reason}.
Archive bot {slug} version {version} with reason {reason}.
GET /wpcom/v2/ai/chat/{bot_id}/{chat_id} Get an AI chat session · GET /wpcom/v2/ai/chat/{bot_id}/{chat_id} #
Ask an LLM
“What did a specific AI chat session contain?”
“Can I include feedback ratings in an AI chat response?”
Tell an agent
Get chat {chat_id} with bot {bot_id}.
Show chat {chat_id} for bot {bot_id} with {items_per_page} items per page.
GET /wpcom/v2/ai/chats/{bot_ids} List AI chat sessions across bots · GET /wpcom/v2/ai/chats/{bot_ids} #
Ask an LLM
“Which AI chat sessions exist across several bots?”
“Can I truncate conversations to the first or last message?”
Tell an agent
List AI chat sessions for bots {bot_ids}.
Show chats for bots {bot_ids} truncated by {truncation_method}.
GET /wpcom/v2/ai/chats/{bot_id} List AI chat sessions for one bot · GET /wpcom/v2/ai/chats/{bot_id} #
Ask an LLM
“What AI chat sessions has one bot had?”
“Can I page through a single bot's chat history?”
Tell an agent
List AI chat sessions for bot {bot_id}.
Show page {page_number} of bot {bot_id}'s chats.
GET /wpcom/v2/ai/dai/workspaces List DALL·E AI workspaces · GET /wpcom/v2/ai/dai/workspaces #
Ask an LLM
“Which DALL·E workspaces are available?”
“Can I see the AI workspaces for image generation?”
Tell an agent
List my DALL·E AI workspaces.
Show the available DALL·E workspaces.
POST /wpcom/v2/ai/feedback/{session_uuid}/rate Rate an AI session · POST /wpcom/v2/ai/feedback/{session_uuid}/rate #
Ask an LLM
“How do I rate an AI session's output?”
“Can I leave a rating for a specific message in an AI session?”
Tell an agent
Rate AI session {session_uuid} with {rating}.
Give session {session_uuid} a {rating} rating for message {message_id}.
POST /wpcom/v2/ai/feedback/{session_uuid}/text Submit text feedback on an AI session · POST /wpcom/v2/ai/feedback/{session_uuid}/text #
Ask an LLM
“How do I give written feedback on an AI session?”
“Can I include previous messages when submitting AI feedback?”
Tell an agent
Submit feedback {feedback} on session {session_uuid} for message {message_id}.
Send text feedback {feedback} on session {session_uuid} from page {page_url}.
POST /wpcom/v2/ai/jwt Get a JWT for an AI agent · POST /wpcom/v2/ai/jwt #
Ask an LLM
“How do I get a JWT to authenticate an AI agent?”
“Can I get an agent token for a specific site?”
Tell an agent
Get an AI JWT for site {blog_id}.
Generate a JWT for agent authentication on site {blog_id}.
POST /wpcom/v2/sites/{site_id}/ai/agent/{agent_id} Add an AI agent to a site · POST /wpcom/v2/sites/{site_id}/ai/agent/{agent_id} #
Ask an LLM
“How do I attach an AI agent to a site?”
“Can I add an agent to a specific WordPress.com site?”
Tell an agent
Add agent {agent_id} to site {site_id}.
Attach AI agent {agent_id} to site {site_id}.
GET /wpcom/v2/sites/{wpcom_site}/ai/asset/{jwt}/download Download an AI asset from a site · GET /wpcom/v2/sites/{wpcom_site}/ai/asset/{jwt}/download #
Ask an LLM
“How do I download an AI asset from a site using a JWT?”
“Can I fetch a site's AI asset with a download link?”
Tell an agent
Download the AI asset for site {wpcom_site} using JWT {jwt}.
Fetch site {wpcom_site}'s AI asset with download token {jwt}.
POST /wpcom/v2/sites/{wpcom_site}/ai/transcription Transcribe audio on a site · POST /wpcom/v2/sites/{wpcom_site}/ai/transcription #
Ask an LLM
“How do I transcribe an audio file on a site?”
“Can I save a transcription as a private post?”
Tell an agent
Transcribe audio {audio_file} on site {wpcom_site}.
Transcribe site {wpcom_site} audio {audio_file} with intent {intent} and save as {save_artifact}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/automattic:automattic-ai-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

automattic-ai-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WordPress.com REST API — wpcom/v2 namespace AI API
  version: v2
  description: Derived by API Evangelist from the WordPress.com REST API route index published at https://public-api.wordpress.com/wpcom/v2/. Paths, HTTP methods, and parameter names/types/descriptions/defaults are taken verbatim from that index. Response schemas are not published in the route index, so successful responses are described but not schematised; the error envelope was observed live on public-api.wordpress.com.
  contact:
    name: Automattic
    url: https://developer.wordpress.com/docs/api/
  x-derived-from: https://public-api.wordpress.com/wpcom/v2/
  x-derived-by: API Evangelist enrichment pipeline
servers:
- url: https://public-api.wordpress.com
security:
- bearerAuth: []
tags:
- name: AI
paths:
  /wpcom/v2/ai/agent/{agent_id}:
    post:
      operationId: postWpcomV2AiAgentbyAgentId
      summary: POST /wpcom/v2/ai/agent/{agent_id}
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: agent_id
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/ai/agent/{agent_id}/sites:
    get:
      operationId: getWpcomV2AiAgentbyAgentIdSites
      summary: GET /wpcom/v2/ai/agent/{agent_id}/sites
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: agent_id
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/ai/bots:
    get:
      operationId: getWpcomV2AiBots
      summary: GET /wpcom/v2/ai/bots
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: product
        in: query
        required: false
        schema:
          type: string
          enum:
          - akismet
          - automattic
          - beeper
          - ciab
          - cloudup
          - crowdsignal
          - dayone
          - gravatar
          - happytools
          - intensedebate
          - jetpack
          - longreads
          - mailpoet
          - newspack
          - parsely
          - pocketcasts
          - p2
          - sensei
          - simplenote
          - template
          - texts
          - tumblr
          - vip
          - woo
          - wordpressjobmanager
          - wpcom
        description: Return only bots belonging to this product.
      - name: search
        in: query
        required: false
        schema:
          type: string
        description: Return only bots whose slug or description contains this substring (case-insensitive).
      - name: include_archived
        in: query
        required: false
        schema:
          type: boolean
          default: false
        description: Include archived versions, and bots whose only versions are archived.
    post:
      operationId: postWpcomV2AiBots
      summary: POST /wpcom/v2/ai/bots
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                yaml:
                  type: string
                  description: The bot YAML configuration; its shape determines the bot type.
                description:
                  type: string
                  description: Human-readable description of the bot.
                product:
                  type: string
                  enum:
                  - akismet
                  - automattic
                  - beeper
                  - ciab
                  - cloudup
                  - crowdsignal
                  - dayone
                  - gravatar
                  - happytools
                  - intensedebate
                  - jetpack
                  - longreads
                  - mailpoet
                  - newspack
                  - parsely
                  - pocketcasts
                  - p2
                  - sensei
                  - simplenote
                  - template
                  - texts
                  - tumblr
                  - vip
                  - woo
                  - wordpressjobmanager
                  - wpcom
                  description: Product the bot belongs to.
                slug_suffix:
                  type: string
                  description: Trailing part of the slug; the full slug is composed as {product}-{type}-{suffix}.
                status:
                  type: string
                  enum:
                  - draft
                  - active
                  - abtest
                  description: Status of the initial version.
                team:
                  type: string
                  description: Owning team.
                visibility:
                  type: string
                  enum:
                  - all-users
                  - logged-in-users
                  - paid-users
                  - internal-users
                  description: Who may access the bot.
                p2_link:
                  type: string
                  description: Optional link to a P2 discussing the bot.
                reason:
                  type: string
                  description: Optional reason recorded in the audit trail.
              required:
              - yaml
              - description
              - product
              - slug_suffix
              - status
              - team
              - visibility
  /wpcom/v2/ai/bots/{slug}:
    get:
      operationId: getWpcomV2AiBotsbySlug
      summary: GET /wpcom/v2/ai/bots/{slug}
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: query
        required: false
        schema:
          type: string
        description: Specific version to fetch. Omit for the bot's default version — the version the bot loads when run (on a live bot, its active version).
  /wpcom/v2/ai/bots/{slug}/versions:
    get:
      operationId: getWpcomV2AiBotsbySlugVersions
      summary: GET /wpcom/v2/ai/bots/{slug}/versions
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
      - name: include_archived
        in: query
        required: false
        schema:
          type: boolean
          default: false
        description: Include archived versions in the response.
    post:
      operationId: postWpcomV2AiBotsbySlugVersions
      summary: POST /wpcom/v2/ai/bots/{slug}/versions
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                yaml:
                  type: string
                  description: The new version's YAML configuration.
                new_version:
                  type: string
                  description: New version number, e.g. 2.0 or 1.3.1.
                description:
                  type: string
                  description: Human-readable description of this version.
                status:
                  type: string
                  enum:
                  - draft
                  - active
                  - abtest
                  description: Status to create the version with.
                team:
                  type: string
                  description: Owning team.
                p2_link:
                  type: string
                  description: Optional link to a P2 discussing this version.
                reason:
                  type: string
                  description: Optional reason recorded in the audit trail.
              required:
              - yaml
              - new_version
              - description
              - status
              - team
  /wpcom/v2/ai/bots/{slug}/versions/{version}:
    get:
      operationId: getWpcomV2AiBotsbySlugVersionsbyVersion
      summary: GET /wpcom/v2/ai/bots/{slug}/versions/{version}
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/ai/bots/{slug}/versions/{version}/status:
    post:
      operationId: postWpcomV2AiBotsbySlugVersionsbyVersionStatus
      summary: POST /wpcom/v2/ai/bots/{slug}/versions/{version}/status
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                new_status:
                  type: string
                  enum:
                  - draft
                  - active
                  - abtest
                  - archived
                  description: 'Target status: draft, active, abtest, or archived.'
                reason:
                  type: string
                  description: Why the status is changing; recorded in the audit trail.
                p2_link:
                  type: string
                  description: Optional link to a P2 discussing the change.
              required:
              - new_status
              - reason
  /wpcom/v2/ai/chat/{bot_id}/{chat_id}:
    get:
      operationId: getWpcomV2AiChatbyBotIdbyChatId
      summary: GET /wpcom/v2/ai/chat/{bot_id}/{chat_id}
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: bot_id
        in: path
        required: true
        schema:
          type: string
      - name: chat_id
        in: path
        required: true
        schema:
          type: string
      - name: page_number
        in: query
        required: false
        schema:
          type: integer
          default: 1
        description: The number of the page to retrieve, limited to 100
      - name: items_per_page
        in: query
        required: false
        schema:
          type: integer
          default: 10
        description: The number of items per page.
      - name: include_feedback
        in: query
        required: false
        schema:
          type: boolean
        description: If true, include the feedback rating value for each message in the response.
  /wpcom/v2/ai/chats/{bot_ids}:
    get:
      operationId: getWpcomV2AiChatsbyBotIds
      summary: GET /wpcom/v2/ai/chats/{bot_ids}
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: bot_ids
        in: path
        required: true
        schema:
          type: string
      - name: truncation_method
        in: query
        required: false
        schema:
          type: string
          enum:
          - first_message
          - last_message
          default: last_message
        description: The method to use for truncating the conversations. Either "first_message" or "last_message". Defaults to "last_message". Note that this parameter affects the response shape. If it is set to `last_message`, the response will include the last message from each chat, while `first_message` will include the first message.
      - name: page_number
        in: query
        required: false
        schema:
          type: integer
          default: 1
        description: The 1-indexed page number to retrieve. Each page contains up to 10 conversations.
  /wpcom/v2/ai/chats/{bot_id}:
    get:
      operationId: getWpcomV2AiChatsbyBotId
      summary: GET /wpcom/v2/ai/chats/{bot_id}
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: bot_id
        in: path
        required: true
        schema:
          type: string
      - name: truncation_method
        in: query
        required: false
        schema:
          type: string
          enum:
          - first_message
          - last_message
          default: last_message
        description: The method to use for truncating the conversations. Either "first_message" or "last_message". Defaults to "last_message". Note that this parameter affects the response shape. If it is set to `last_message`, the response will include the last message from each chat, while `first_message` will include the first message.
      - name: page_number
        in: query
        required: false
        schema:
          type: integer
          default: 1
        description: The 1-indexed page number to retrieve. Each page contains up to 10 conversations.
  /wpcom/v2/ai/dai/workspaces:
    get:
      operationId: getWpcomV2AiDaiWorkspaces
      summary: GET /wpcom/v2/ai/dai/workspaces
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
  /wpcom/v2/ai/feedback/{session_uuid}/rate:
    post:
      operationId: postWpcomV2AiFeedbackbySessionUuidRate
      summary: POST /wpcom/v2/ai/feedback/{session_uuid}/rate
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: session_uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                message_id:
                  type: string
                trace_id:
                  type: string
                rating:
                  type: string
                  enum:
                  - up
                  - down
                message_text:
                  type: string
                metadata:
                  type: object
                  default: []
              required:
              - rating
  /wpcom/v2/ai/feedback/{session_uuid}/text:
    post:
      operationId: postWpcomV2AiFeedbackbySessionUuidText
      summary: POST /wpcom/v2/ai/feedback/{session_uuid}/text
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: session_uuid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                message_id:
                  type: string
                trace_id:
                  type: string
                feedback:
                  type: string
                previous_messages:
                  type: array
                  default: []
                  items:
                    type: object
                page_url:
                  type: string
              required:
              - message_id
              - feedback
  /wpcom/v2/ai/jwt:
    post:
      operationId: postWpcomV2AiJwt
      summary: POST /wpcom/v2/ai/jwt
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                blog_id:
                  type: integer
  /wpcom/v2/sites/{site_id}/ai/agent/{agent_id}:
    post:
      operationId: postWpcomV2SitesbySiteIdAiAgentbyAgentId
      summary: POST /wpcom/v2/sites/{site_id}/ai/agent/{agent_id}
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: agent_id
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/sites/{wpcom_site}/ai/asset/{jwt}/download:
    get:
      operationId: getWpcomV2SitesbyWpcomSiteAiAssetbyJwtDownload
      summary: GET /wpcom/v2/sites/{wpcom_site}/ai/asset/{jwt}/download
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: jwt
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/sites/{wpcom_site}/ai/transcription:
    post:
      operationId: postWpcomV2SitesbyWpcomSiteAiTranscription
      summary: POST /wpcom/v2/sites/{wpcom_site}/ai/transcription
      tags:
      - AI
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                intent:
                  type: string
                  description: 'Transcription intent: dictation, command, agent, or auto.'
                selected_text:
                  type: string
                  description: Selected text to transform when intent is command.
                app_context:
                  type: string
                  description: JSON encoded client context.
                client:
                  type: string
                  description: Client identifier.
                client_version:
                  type: string
                  description: Client version.
                audio_file:
                  type: string
                  description: The audio file to transcribe.
                save_artifact:
                  type: boolean
                  default: false
                  description: When true, save the transcript as a private wp_guideline artifact post tagged Transcription.
components:
  schemas:
    WPRestError:
      type: object
      description: WordPress REST API error envelope (observed on public-api.wordpress.com).
      properties:
        code:
          type: string
          example: rest_unauthorized
        message:
          type: string
          example: Authentication required.
        data:
          type: object
          properties:
            status:
              type: integer
              example: 401
  securitySchemes:
    oauth2:
      type: oauth2
      description: WordPress.com OAuth 2.1, per https://public-api.wordpress.com/.well-known/openid-configuration
      flows:
        authorizationCode:
          authorizationUrl: https://public-api.wordpress.com/oauth2-1/authorize
          tokenUrl: https://public-api.wordpress.com/oauth2-1/token
          refreshUrl: https://public-api.wordpress.com/oauth2-1/token
          scopes:
            global: ''
            auth: ''
            openid: ''
            profile: ''
            email: ''
            users: ''
            sites: ''
            posts: ''
            comments: ''
            taxonomy: ''
            follow: ''
            sharing: ''
            freshly-pressed: ''
            notifications: ''
            insights: ''
            read: ''
            stats: ''
            media: ''
            menus: ''
            batch: ''
            videos: ''
    bearerAuth:
      type: http
      scheme: bearer