> ## Documentation Index
> Fetch the complete documentation index at: https://docs.copyfy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# create_store_from_product

> Start a Store AI project from a product found with Copyfy.

Starts a Store AI project from a product, like pasting a product link in Store AI. Copyfy imports the product into a new project; you then open `setup_url` in Copyfy to choose the store name, language, and template, and Store AI generates the store there, using AI image credits as in the dashboard.

Copyfy tells your assistant to call it only when you ask for a store, and marks it as a tool that changes your account so your client can ask you first.

**Cost:** 1 credit, set aside when the call starts and given back if it fails. No AI credit is spent at this step.

## Arguments

| Argument | Type | Allowed values |
| - | - | - |
| `product_id` | integer or numeric string | Copyfy product id, from [`search_products`](https://docs.copyfy.io/tools/search-products), [`get_product`](https://docs.copyfy.io/tools/get-product), or [`get_shop`](https://docs.copyfy.io/tools/get-shop): its product page becomes the store's product. |
| `product_url` | string | A product page on a Shopify store, AliExpress, Alibaba, Amazon, or TikTok Shop. |

Pass `product_id` or `product_url`, not both.

## Example

```json Tool call theme={null}
{
  "name": "create_store_from_product",
  "arguments": { "product_id": 4419021 }
}
```

```json Result theme={null}
{
  "job": { "id": "sto_k3v9x2m1q8w7", "kind": "store_ai", "status": "running", "poll_after_seconds": 10 },
  "project": { "id": "k3v9x2m1q8w7", "title": "Example Pet Store", "status": "setup" },
  "product_url": "https://example-pet-store.com/products/self-cleaning-brush",
  "setup_url": "https://app.copyfy.io/dashboard/store-ai/k3v9x2m1q8w7/setup",
  "next_action": { "type": "open_dashboard", "reason": "finish_store_setup", "url": "https://app.copyfy.io/dashboard/store-ai/k3v9x2m1q8w7/setup" },
  "message": "Copyfy is importing the product into a new Store AI project. Once get_job_status reports action_required, the user opens setup_url to choose the store name, language and template, and Copyfy generates the store there.",
  "ai_credits": { "charged": 0 }
}
```

Follow the product import with [`get_job_status`](https://docs.copyfy.io/tools/get-job-status). When it reports `action_required`, open `setup_url`.

## Errors

| Code | When |
| - | - |
| [`invalid_arguments`](https://docs.copyfy.io/errors#invalid_arguments) | Both or neither argument, or a link Store AI cannot start from. |
| [`not_found`](https://docs.copyfy.io/errors#not_found) | No Copyfy product has this id, the product or its store is no longer available, or Copyfy has no link to its product page. |
| [`service_unavailable`](https://docs.copyfy.io/errors#service_unavailable) | The project was created but the product import could not start: the error includes `project_id` and `setup_url` to retry from Copyfy. |
| [`feature_unavailable`](https://docs.copyfy.io/errors#feature_unavailable) | Store AI is not available on this account right now, or the account is connected through the Shopify app: `dashboard_url` then opens the dashboard's store builder with this product. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.