> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About the Wix AI APIs

## Article: About the Wix AI APIs

## Article Link: https://dev.wix.com/docs/api-reference/articles/ai-tools/ai-apis/about-the-wix-ai-apis.md

## Article Content:

# About the Wix AI APIs

<blockquote class="caution">

<strong>Developer Preview</strong>

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

</blockquote>

> **Authentication and Permissions**
>
> To use the AI APIs, you must be authenticated as a Wix app or Wix user [identity](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities.md). When [extending a site](https://dev.wix.com/docs/api-reference/articles/platform-overview/about-wix-site-development.md), you can also authenticate with an [API key](https://dev.wix.com/docs/api-reference/articles/authentication/about-api-keys.md).
>
> For [app development](https://dev.wix.com/docs/build-apps/develop-your-app/about-developing-apps.md), you must also include the [`INVOKE AI MODELS`](https://manage.wix.com/app-selector?title=Select+an+App&subtitle=After+Selection+you+will+be+redirected+to+App+Permissions+Page&primaryButtonText=Go+to+permissions+page&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions%2Fadd%3FselectedPermission%3DSCOPE.DATA_SCIENCE.INVOKE_AI_MODELS%26filterByPermissionName%3DSCOPE.DATA_SCIENCE.INVOKE_AI_MODELS) permission scope. Learn more about [app permissions](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions.md).

::::tabs
:::REST_TAB
The Wix AI APIs provide a streamlined way to interact with multiple AI providers in your code while Wix handles authentication and billing:
:::
:::SDK_TAB
Built on the [Vercel AI SDK](https://ai-sdk.dev/), the Wix AI APIs provide a streamlined way to interact with multiple AI providers in your code while Wix handles authentication and billing:
:::
::::

- When [extending a site](https://dev.wix.com/docs/api-reference/articles/platform-overview/about-wix-site-development.md), Wix bills based on AI model usage by you, your collaborators, members, and visitors.
- When [building a Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/about-wix-apps.md), Wix bills the Wix users who install your app, so you don't need to set up billing integration.

::::tabs
:::REST_TAB

:::
:::SDK_TAB

Learn how to [set up the Wix AI SDK](https://dev.wix.com/docs/api-reference/articles/ai-tools/ai-apis/set-up-the-wix-ai-sdk.md).
:::
::::

<blockquote class="important">

**Important:**
Each method call uses approximately 1 AI credit. Learn more about [AI credits on Wix](https://support.wix.com/en/article/about-ai-credits).

</blockquote>

## Providers and models

Wix provides access to models from the following providers. To call any supported provider method, use this base URL pattern:

```curl
https://www.wixapis.com/{provider}/v1/{method-path}
```

To view the full list of models, call each provider's method at the specified URL. See each provider's documentation for request parameters and response details:

| Provider  | Method                                                                    | URL to call                                   |
| --------- | ------------------------------------------------------------------------- | --------------------------------------------- |
| OpenAI    | [List Models](https://platform.openai.com/docs/api-reference/models/list) | `https://www.wixapis.com/openai/v1/models`    |
| Anthropic | [List Models](https://platform.claude.com/docs/en/api/models/list)        | `https://www.wixapis.com/anthropic/v1/models` |

> **Note:** When a provider releases a new model, it might take a few days before Wix supports it.

## Generating text

::::tabs
:::REST_TAB

Generate text from prompts using models by the following providers:

### OpenAI

OpenAI methods are available on the following base URL:

```curl
https://www.wixapis.com/openai/v1/{method-path}
```

Generate text by calling any supported OpenAI method on its path:

| Name                                                                                       | Description                                                | Path                |
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | ------------------- |
| [Create a model response](https://platform.openai.com/docs/api-reference/responses/create) | Create a response from text or image prompts.              | `/responses`        |
| [Create chat completion](https://platform.openai.com/docs/api-reference/chat/create)       | Create a model response for a specified chat conversation. | `/chat/completions` |

> **Note:** To stream the response, set the `stream` parameter to `true`.

For example, this request uses the GPT-5 model to generate a response to the prompt "Tell me a bedtime story about a unicorn":

```curl
curl -X POST 'https://www.wixapis.com/openai/v1/responses' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
  "model": "gpt-5",
  "input": "Tell me a bedtime story about a unicorn."
}'
```

### Anthropic

Anthropic methods are available on the following base URL:

```curl
https://www.wixapis.com/anthropic/v1/{method-path}
```

Generate text by calling any supported Anthropic method on its path:

| Name                                                                        | Description                                     | Path        |
| --------------------------------------------------------------------------- | ----------------------------------------------- | ----------- |
| [Create a message](https://platform.claude.com/docs/en/api/messages/create) | Create a message from a list of input messages. | `/messages` |

> **Note:** To stream the response, set the `stream` parameter to `true`.

> **Note:** Anthropic requires the `anthropic-version` header on every request. Omitting it returns a `400` error with the message `anthropic-version: header is required`.

For example, this request uses the Claude Opus 4.6 model to stream a response to the prompt "Hello, world":

```curl
curl -X POST 'https://www.wixapis.com/anthropic/v1/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-H 'anthropic-version: 2023-06-01' \
-d '{
  "messages": [
    {
      "content": "Hello, world",
      "role": "user"
    }
  ],
  "model": "claude-opus-4-6",
  "stream": true
}'
```

:::
:::SDK_TAB

Generate text from prompts with the following methods:

- [`generateText()`](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text): Generates text for a specified prompt and model.
- [`streamText()`](https://ai-sdk.dev/docs/reference/ai-sdk-core/stream-text): Streams text from a specified prompt and model.

For example, this code snippet generates text using OpenAI's GPT-5 model via the Responses API:

```js
import { generateText } from "ai";
import { openai } from "@wix/ai";

const { text } = await generateText({
  model: openai.responses("gpt-5"),
  prompt: "Invent a new holiday and describe its traditions.",
});

console.log(text);
```

This code snippet generates text using Anthropic's Claude Opus 4.6 model:

```js
import { generateText } from "ai";
import { anthropic } from "@wix/ai";

const { text } = await generateText({
  model: anthropic("claude-opus-4-6"),
  prompt: "Tell me a bedtime story about a unicorn.",
});

console.log(text);
```

:::
::::

### Suggested models

You can generate text using these suggested models from the following providers:

| Provider  | Model               |
| --------- | ------------------- |
| OpenAI    | `gpt-5.2-pro`       |
| OpenAI    | `gpt-5.2`           |
| OpenAI    | `gpt-5.1`           |
| OpenAI    | `gpt-5-nano`        |
| OpenAI    | `gpt-5-mini`        |
| OpenAI    | `gpt-5`             |
| OpenAI    | `gpt-4.1-nano`      |
| OpenAI    | `gpt-4.1-mini`      |
| OpenAI    | `gpt-4.1`           |
| Anthropic | `claude-opus-4-7`   |
| Anthropic | `claude-sonnet-4-6` |
| Anthropic | `claude-haiku-4-5-20251001` |

> **Note:** Anthropic model IDs are date-stamped. Use the exact ID returned by [List Models](#providers-and-models) rather than an undated name. For example, `claude-haiku-4-5` alone returns a `400 Unsupported model` error.

Learn more about [providers and models](#providers-and-models).

## Generating embeddings

::::tabs
:::REST_TAB

Create vector representations for semantic comparisons and search using models by the following providers:

### OpenAI

OpenAI methods are available on the following base URL:

```curl
https://www.wixapis.com/openai/v1/{method-path}
```

Generate embeddings by calling the supported OpenAI method on its path:

| Name                                                                                  | Description                                              | Path          |
| ------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------- |
| [Create embeddings](https://platform.openai.com/docs/api-reference/embeddings/create) | Create an embeddings vector representing the input text. | `/embeddings` |

For example, this request uses the text-embedding-ada-002 model to create an embedding vector:

```curl
curl -X POST 'https://www.wixapis.com/openai/v1/embeddings' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
  "input": "The food was delicious but the waiter was rude.",
  "model": "text-embedding-ada-002",
  "encoding_format": "float"
}'
```

:::
:::SDK_TAB

Create vector representations for semantic comparisons and search by calling the following methods:

- [`embed()`](https://ai-sdk.dev/docs/reference/ai-sdk-core/embed): Embed a single value.
- [`embedMany()`](https://ai-sdk.dev/docs/reference/ai-sdk-core/embed-many): Embed multiple values at once.

For example, this code snippet uses OpenAI's text-embedding-3-small model via the [Embeddings API](https://ai-sdk.dev/docs/ai-sdk-core/embeddings) to create multiple embedding vectors:

```js
import { embedMany } from "ai";
import { openai } from "@wix/ai";

const { embeddings } = await embedMany({
  model: openai.embeddingModel("text-embedding-3-small"),
  values: [
    "sunny day at the beach",
    "rainy afternoon in the city",
    "snowy night in the mountains",
  ],
});
```

:::
::::

### Suggested models

You can create embeddings using these suggested models from the following providers:

| Provider | Model                    |
| -------- | ------------------------ |
| OpenAI   | `text-embedding-3-small` |
| OpenAI   | `text-embedding-3-large` |
| OpenAI   | `text-embedding-ada-002` |

Learn more about [providers and models](#providers-and-models).

## Generating images

::::tabs
:::REST_TAB

Generate images from text prompts using models by the following providers:

### Runware

Access [Runware](https://runware.ai/docs/image-inference/introduction) image generation functionality using the following URL:

```curl
https://www.wixapis.com/runwareschemaless/v1/request
```

To interact with Runware models, send a [request with an array of tasks](https://runware.ai/docs/image-inference/api-reference#request), each containing the required configuration details.

For example, this request generates an image using Google's Nano Banana Pro 2 model:

```curl
curl -X POST 'https://www.wixapis.com/runwareschemaless/v1/request' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '[{
  "taskType": "imageInference",
  "taskUUID": "a770f077-f413-47de-9dac-be0b26a35da6",
  "outputType": "URL",
  "outputFormat": "jpg",
  "positivePrompt": "a serene mountain landscape with a crystal-clear lake reflecting the sky",
  "height": 1024,
  "width": 1024,
  "model": "google:4@2",
  "steps": 30,
  "CFGScale": 7.5,
  "numberResults": 4
}]'
```

:::
:::SDK_TAB

Generate images from text prompts by calling the following method:

- [`generateImage()`](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-image)

For example, this code snippet uses Google's Nano Banana Pro 2 model to generate an image:

```js
import { generateImage } from "ai";
import { runware } from "@wix/ai";

const result = await generateImage({
  model: runware.image("google:4@2"),
  prompt: "A futuristic cityscape at night with neon lights",
});
```

:::
::::

### Suggested models

You can generate images using these suggested [Runware models](https://runware.ai/models). Specify the [model's AIR ID](https://runware.ai/docs/image-inference/models#air-system) in the image generation method:

| Model name         | Model AIR ID             |
| ------------------ | ------------------------ |
| FLUX.2 Dev         | `runware:400@1`          |
| FLUX.2 Pro         | `bfl:5@1`                |
| Ideogram 3.0       | `ideogram:4@1`           |
| ImagineArt 1.5 Pro | `imagineart:1.5-pro@0`   |
| Nano Banana Pro 2  | `google:4@2`             |
| Seedream 4.5       | `bytedance:seedream@4.5` |
| Z-Image-Turbo      | `runware:z-image@turbo`  |

> **Note:** You can use any model supported by Runware. [Sign up to Runware](https://my.runware.ai/signup) to explore the full model list.

## See also

- [Set up the Wix AI SDK](https://dev.wix.com/docs/api-reference/articles/ai-tools/ai-apis/set-up-the-wix-ai-sdk.md)
- [About AI credits on Wix](https://support.wix.com/en/article/about-ai-credits)
- [Vercel AI SDK Core](https://ai-sdk.dev/docs/ai-sdk-core/overview)