> For the complete documentation index, see [llms.txt](https://docs.beefree.io/beefree-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.beefree.io/beefree-sdk/apis/content-services-api/ai-collection.md).

# AI Collection

{% hint style="info" %}
AI Collection endpoints are part of the [Content Services API](/beefree-sdk/apis/content-services-api.md). The Content Services API is available on [Beefree SDK plans that are Essentials or above](https://developers.beefree.io/pricing-plans).
{% endhint %}

## Overview

The resources in the AI collection accept your template JSON and use generative AI to return text within a JSON object to you.

{% hint style="info" %}
**Important:** `collection` is a placeholder within the URL. This placeholder can be replaces with any of the `collection` options available for the AI Collection resource. Reference the [AI Collection Resource and Collection Options table ](/beefree-sdk/apis/content-services-api.md#ai-collection)for a list of available option.
{% endhint %}

### Available Collection Value for AI Endpoints

The following table lists the collection values available in this category of endpoints, and their corresponding collection options.

{% hint style="info" %}
**Note:** The only collection value available for this category of endpoints is **ai**. Therefore, all **{collection}** placeholders in the URL in this category should be replaced with **ai**.
{% endhint %}

Prior to referencing the table, the following example shows how you can replace the **{collection}** placeholder with **ai**.

#### How to Replace the {collection} Placeholder

The following example URL has a **{collection}** placeholder. This placeholder needs to be filled in with a **Collection Option** prior to making an API call.

`https://api.getbee.io/v1/{collection}/sms`

As an example, if you'd like to generate SMS text using this endpoint, replace **{collection}** with **ai**.

The final URL to make the API call will be:

`https://api.getbee.io/v1/ai/sms`

The following table provides a comprehensive reference of all available options based on what you'd like to generate.

| Resource    | Collection Options                 |
| ----------- | ---------------------------------- |
| `/sms`      | <ul><li><code>/ai</code></li></ul> |
| `/metadata` | <ul><li><code>/ai</code></li></ul> |
| `/summary`  | <ul><li><code>/ai</code></li></ul> |

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

Prior to getting started with the resources in this collection, ensure you have the following:

* **Superpowers** subscription or higher.
* An [AI Provider](/beefree-sdk/builder-addons/partner-addons/ai-writing-assistant/available-providers.md) configured within the [Beefree SDK Developer Console](https://developers.beefree.io/login?from=website_menu).
* Content Services **API key.**

{% hint style="info" %}
**Note:** Charges from your AI Provider are separate from those from Beefree SDK.
{% endhint %}

### Metadata (Preheader and Subject) <a href="#metadata" id="metadata"></a>

`v1/ai/metadata`

{% openapi src="/files/ePRRZegtWoKhihmYZbxQ" path="/v1/{collection}/metadata" method="post" %}
[metadata\_endpoint.yaml](https://806400411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8c7XIQHfAtM23Dp3ozIC%2Fuploads%2FlzQf3zrkDf12tNvYrEsb%2Fmetadata_endpoint.yaml?alt=media\&token=3174220a-8ea7-4e44-8c87-f9e5a774cb45)
{% endopenapi %}

### SMS <a href="#sms" id="sms"></a>

`v1/ai/sms`

{% openapi src="/files/IpTLhPuALJIlj8Trw4cE" path="/v1/{collection}/sms" method="post" %}
[sms\_endpoint.yaml](https://806400411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8c7XIQHfAtM23Dp3ozIC%2Fuploads%2Fx5stsHs9AKeuQ12duDxL%2Fsms_endpoint.yaml?alt=media\&token=70a27007-500d-47a6-88d3-105c1a344afb)
{% endopenapi %}

### Summary

`v1/ai/summary`

{% openapi src="/files/J1hjpuk9zHnVJKRNNg9d" path="/v1/{collection}/summary" method="post" %}
[summary\_endpoint.yaml](https://806400411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8c7XIQHfAtM23Dp3ozIC%2Fuploads%2FanQxcYQiVfqGI9KTvf8G%2Fsummary_endpoint.yaml?alt=media\&token=0a50c990-eb85-4cb9-83eb-f9d317aea0ec)
{% endopenapi %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.beefree.io/beefree-sdk/apis/content-services-api/ai-collection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
