openapi: 3.2.0 info: title: WordPress.com REST API — wpcom/v2 namespace Jetpack AI Image 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: jetpack-ai-image paths: /wpcom/v2/jetpack-ai-image: get: operationId: getWpcomV2JetpackAiImage summary: GET /wpcom/v2/jetpack-ai-image tags: - jetpack-ai-image 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: background in: query required: false schema: type: string description: The background color of the image. - name: prompt in: query required: false schema: type: string description: A prompt describing the image requested to the OpenAI service. - name: model in: query required: false schema: type: string default: dall-e-3 description: The model to be used. - name: size in: query required: false schema: type: string description: The image resolution. - name: quantity in: query required: false schema: type: string description: The number of images. - name: n in: query required: false schema: type: integer default: 1 description: The number of images. Up to 10 - name: quality in: query required: false schema: type: string default: auto description: The image quality. - name: output_format in: query required: false schema: type: string default: png description: The output format of the image. - name: response_format in: query required: false schema: type: string default: b64_json description: The expected response format. Stable Diffusion only supports b64_json. - name: feature in: query required: false schema: type: string description: The feature to use for logging requests. - name: image_format in: query required: false schema: type: string default: PNG description: The output format of the image. - name: session_id in: query required: false schema: type: string description: Session ID for logging purposes. - name: style in: query required: false schema: type: string description: The style of the image, when generating using Stable Diffusion or FLUX. - name: messages in: query required: false schema: type: string description: The JSON-encoded list of messages to be completed by the OpenAI service. - name: token in: query required: true schema: type: string description: The JWT token to authenticate the request. post: operationId: postWpcomV2JetpackAiImage summary: POST /wpcom/v2/jetpack-ai-image tags: - jetpack-ai-image 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: background: type: string description: The background color of the image. prompt: type: string description: A prompt describing the image requested to the OpenAI service. model: type: string default: dall-e-3 description: The model to be used. size: type: string description: The image resolution. quantity: type: string description: The number of images. n: type: integer default: 1 description: The number of images. Up to 10 quality: type: string default: auto description: The image quality. output_format: type: string default: png description: The output format of the image. response_format: type: string default: b64_json description: The expected response format. Stable Diffusion only supports b64_json. feature: type: string description: The feature to use for logging requests. image_format: type: string default: PNG description: The output format of the image. session_id: type: string description: Session ID for logging purposes. style: type: string description: The style of the image, when generating using Stable Diffusion or FLUX. messages: type: array items: {} description: The list of messages to be completed by the OpenAI service. put: operationId: putWpcomV2JetpackAiImage summary: PUT /wpcom/v2/jetpack-ai-image tags: - jetpack-ai-image 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: background: type: string description: The background color of the image. prompt: type: string description: A prompt describing the image requested to the OpenAI service. model: type: string default: dall-e-3 description: The model to be used. size: type: string description: The image resolution. quantity: type: string description: The number of images. n: type: integer default: 1 description: The number of images. Up to 10 quality: type: string default: auto description: The image quality. output_format: type: string default: png description: The output format of the image. response_format: type: string default: b64_json description: The expected response format. Stable Diffusion only supports b64_json. feature: type: string description: The feature to use for logging requests. image_format: type: string default: PNG description: The output format of the image. session_id: type: string description: Session ID for logging purposes. style: type: string description: The style of the image, when generating using Stable Diffusion or FLUX. messages: type: array items: {} description: The list of messages to be completed by the OpenAI service. patch: operationId: patchWpcomV2JetpackAiImage summary: PATCH /wpcom/v2/jetpack-ai-image tags: - jetpack-ai-image 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: background: type: string description: The background color of the image. prompt: type: string description: A prompt describing the image requested to the OpenAI service. model: type: string default: dall-e-3 description: The model to be used. size: type: string description: The image resolution. quantity: type: string description: The number of images. n: type: integer default: 1 description: The number of images. Up to 10 quality: type: string default: auto description: The image quality. output_format: type: string default: png description: The output format of the image. response_format: type: string default: b64_json description: The expected response format. Stable Diffusion only supports b64_json. feature: type: string description: The feature to use for logging requests. image_format: type: string default: PNG description: The output format of the image. session_id: type: string description: Session ID for logging purposes. style: type: string description: The style of the image, when generating using Stable Diffusion or FLUX. messages: type: array items: {} description: The list of messages to be completed by the OpenAI service. 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