Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.maxicore.ai/llms.txt

Use this file to discover all available pages before exploring further.

Media abilities let you add files to your WordPress media library, attach them to posts, and manage existing attachments. You can upload from a remote URL or send file content directly as a base64-encoded payload — no FTP access or manual file handling required.

All media abilities

AbilityDescriptionCapabilityPlan
maxi/upload-imageUpload an image from a URL or base64 payload. Accepts url or filename + content_base64.upload_filesLite
maxi/upload-attachmentUpload any file type from a URL or base64 payload, with optional title, alt text, caption, and parent post.upload_filesLite
maxi/get-attachmentGet full attachment details including metadata, available sizes, and MIME type.readLite
maxi/delete-attachmentPermanently delete an attachment and all its generated files.delete_postsLite
maxi/list-attachmentsList attachments with optional filters for MIME type, parent post, or search query.readLite
maxi/set-featured-imageSet or remove the featured image on a post.edit_postsLite
maxi/attach-mediaAttach a media item to a parent post.edit_postsLite
maxi/detach-mediaDetach a media item, making it unattached in the media library.edit_postsLite
maxi/regenerate-thumbnailsRegenerate all registered image sizes for an existing attachment.upload_filesLite
All upload abilities require the upload_files capability. Make sure the WordPress user connected to your AI client has this capability before calling any upload ability.

Key ability examples

maxi/upload-image

Upload an image to the media library from a remote URL, or send the file content as a base64 string.
{
  "url": "https://example.com/image.jpg",
  "title": "My Image",
  "alt_text": "Description of image"
}

maxi/upload-attachment

Upload any file type — PDFs, documents, zip archives, and more. Use this when you need to upload something that isn’t an image.
{
  "url": "https://example.com/document.pdf",
  "title": "Annual Report 2025"
}
Like maxi/upload-image, you can also pass filename + content_base64 instead of a url. Set the featured image on any post, page, or custom post type by providing the post ID and the attachment ID of an existing media item.
{
  "post_id": 123,
  "attachment_id": 456
}
To remove the featured image from a post, set attachment_id to null.
{
  "post_id": 123,
  "attachment_id": null
}

maxi/regenerate-thumbnails

Regenerate all registered image sizes for an attachment. Use this after you add new image size registrations to your theme, or after you change an image in the media library.
{ "attachment_id": 456 }
If you’ve uploaded an image and then changed your theme’s registered image sizes, run maxi/regenerate-thumbnails to create the new sizes for existing uploads. WordPress does not generate missing sizes automatically for previously uploaded files.

Attaching and detaching media

Use maxi/attach-media to associate an existing media item with a parent post, and maxi/detach-media to remove that association and return the item to the unattached state. These operations do not delete the file from the media library.
maxi/delete-attachment permanently deletes the attachment record and all generated image files from disk. This action cannot be undone. Use it carefully.