# Recraft V4 Styles Create Style

> Creates a reusable style from your reference images and returns a style ID you can pass to Recraft V4 Styles image and vector generation.


## Overview

- **Endpoint**: `https://fal.run/recraft/v4/create-style`
- **Model ID**: `recraft/v4/create-style`
- **Category**: training
- **Kind**: inference
**Tags**: transform, utility, stylized



## Pricing

- **Price**: $0.005 per requests

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`image_urls`** (`list<string>`, _required_):
  The URLs of the style reference images. Supports PNG, JPG, and WEBP; provide between 1 and 10 images.
  - Array of string
  - Examples: ["https://storage.googleapis.com/falserverless/example_inputs/recraft-styles-reference.png"]

- **`base_style`** (`BaseStyleEnum`, _optional_):
  The base style of the generated images. Default value: `"any"`
  - Default: `"any"`
  - Options: `"any"`, `"vector_illustration"`

- **`match`** (`MatchEnum`, _optional_):
  How closely generated images should follow the style. Default value: `"precise"`
  - Default: `"precise"`
  - Options: `"precise"`, `"flexible"`

- **`image_weights`** (`list<float>`, _optional_):
  One weight per image URL, in the same order as `image_urls`.
  - Array of float



**Required Parameters Example**:

```json
{
  "image_urls": [
    "https://storage.googleapis.com/falserverless/example_inputs/recraft-styles-reference.png"
  ]
}
```

**Full Example**:

```json
{
  "image_urls": [
    "https://storage.googleapis.com/falserverless/example_inputs/recraft-styles-reference.png"
  ],
  "base_style": "any",
  "match": "precise"
}
```


### Output Schema

The API returns the following output format:

- **`style_id`** (`string`, _required_):
  The ID of the created style, this ID can be used to reference the style in the future.



**Example Response**:

```json
{
  "style_id": ""
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/recraft/v4/create-style \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_urls": [
       "https://storage.googleapis.com/falserverless/example_inputs/recraft-styles-reference.png"
     ]
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "recraft/v4/create-style",
    arguments={
        "image_urls": ["https://storage.googleapis.com/falserverless/example_inputs/recraft-styles-reference.png"]
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("recraft/v4/create-style", {
  input: {
    image_urls: ["https://storage.googleapis.com/falserverless/example_inputs/recraft-styles-reference.png"]
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/recraft/v4/create-style)
- [API Documentation](https://fal.ai/models/recraft/v4/create-style/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=recraft/v4/create-style)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
