Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.31.0"
".": "1.32.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-10f7ae53f4fe4f2394c22788b648d9db742a178ed41a87beb39de741660e646b.yml
openapi_spec_hash: 9885c47a02677471a38f16dddbad1823
config_hash: 6f10592c7d0c3bafefc1271472283217
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-f6fec0ae4fa4572aefa111e660f98f6acfb6149c22cbd413bd3defad6c100478.yml
openapi_spec_hash: a82bf07982eae3814e8a60eb368e0ce5
config_hash: c3aaaa9794dba44d524c06591ab17894
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.32.0 (2026-02-09)

Full Changelog: [v1.31.0...v1.32.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.31.0...v1.32.0)

### Features

* **api:** manual updates ([4dc72c5](https://github.com/brand-dot-dev/python-sdk/commit/4dc72c5ee1563a72f7d0cfbc3196fc94694acf95))

## 1.31.0 (2026-02-07)

Full Changelog: [v1.30.0...v1.31.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.30.0...v1.31.0)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Types:
```python
from brand.dev.types import (
BrandRetrieveResponse,
BrandAIProductResponse,
BrandAIProductsResponse,
BrandAIQueryResponse,
BrandFontsResponse,
Expand All @@ -25,6 +26,7 @@ from brand.dev.types import (
Methods:

- <code title="get /brand/retrieve">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_response.py">BrandRetrieveResponse</a></code>
- <code title="post /brand/ai/product">client.brand.<a href="./src/brand/dev/resources/brand.py">ai_product</a>(\*\*<a href="src/brand/dev/types/brand_ai_product_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_ai_product_response.py">BrandAIProductResponse</a></code>
- <code title="post /brand/ai/products">client.brand.<a href="./src/brand/dev/resources/brand.py">ai_products</a>(\*\*<a href="src/brand/dev/types/brand_ai_products_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_ai_products_response.py">BrandAIProductsResponse</a></code>
- <code title="post /brand/ai/query">client.brand.<a href="./src/brand/dev/resources/brand.py">ai_query</a>(\*\*<a href="src/brand/dev/types/brand_ai_query_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_ai_query_response.py">BrandAIQueryResponse</a></code>
- <code title="get /brand/fonts">client.brand.<a href="./src/brand/dev/resources/brand.py">fonts</a>(\*\*<a href="src/brand/dev/types/brand_fonts_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_fonts_response.py">BrandFontsResponse</a></code>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "brand.dev"
version = "1.31.0"
version = "1.32.0"
description = "The official Python library for the brand.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/brand/dev/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "brand.dev"
__version__ = "1.31.0" # x-release-please-version
__version__ = "1.32.0" # x-release-please-version
106 changes: 106 additions & 0 deletions src/brand/dev/resources/brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
brand_ai_query_params,
brand_prefetch_params,
brand_retrieve_params,
brand_ai_product_params,
brand_screenshot_params,
brand_styleguide_params,
brand_ai_products_params,
Expand Down Expand Up @@ -39,6 +40,7 @@
from ..types.brand_ai_query_response import BrandAIQueryResponse
from ..types.brand_prefetch_response import BrandPrefetchResponse
from ..types.brand_retrieve_response import BrandRetrieveResponse
from ..types.brand_ai_product_response import BrandAIProductResponse
from ..types.brand_screenshot_response import BrandScreenshotResponse
from ..types.brand_styleguide_response import BrandStyleguideResponse
from ..types.brand_ai_products_response import BrandAIProductsResponse
Expand Down Expand Up @@ -189,6 +191,52 @@ def retrieve(
cast_to=BrandRetrieveResponse,
)

def ai_product(
self,
*,
url: str,
timeout_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandAIProductResponse:
"""
Beta feature: Given a single URL, determines if it is a product detail page,
classifies the platform/product type, and extracts the product information.
Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.

Args:
url: The product page URL to extract product data from.

timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
300000ms (5 minutes).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._post(
"/brand/ai/product",
body=maybe_transform(
{
"url": url,
"timeout_ms": timeout_ms,
},
brand_ai_product_params.BrandAIProductParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=BrandAIProductResponse,
)

@overload
def ai_products(
self,
Expand Down Expand Up @@ -1785,6 +1833,52 @@ async def retrieve(
cast_to=BrandRetrieveResponse,
)

async def ai_product(
self,
*,
url: str,
timeout_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandAIProductResponse:
"""
Beta feature: Given a single URL, determines if it is a product detail page,
classifies the platform/product type, and extracts the product information.
Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.

Args:
url: The product page URL to extract product data from.

timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
300000ms (5 minutes).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._post(
"/brand/ai/product",
body=await async_maybe_transform(
{
"url": url,
"timeout_ms": timeout_ms,
},
brand_ai_product_params.BrandAIProductParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=BrandAIProductResponse,
)

@overload
async def ai_products(
self,
Expand Down Expand Up @@ -3253,6 +3347,9 @@ def __init__(self, brand: BrandResource) -> None:
self.retrieve = to_raw_response_wrapper(
brand.retrieve,
)
self.ai_product = to_raw_response_wrapper(
brand.ai_product,
)
self.ai_products = to_raw_response_wrapper(
brand.ai_products,
)
Expand Down Expand Up @@ -3304,6 +3401,9 @@ def __init__(self, brand: AsyncBrandResource) -> None:
self.retrieve = async_to_raw_response_wrapper(
brand.retrieve,
)
self.ai_product = async_to_raw_response_wrapper(
brand.ai_product,
)
self.ai_products = async_to_raw_response_wrapper(
brand.ai_products,
)
Expand Down Expand Up @@ -3355,6 +3455,9 @@ def __init__(self, brand: BrandResource) -> None:
self.retrieve = to_streamed_response_wrapper(
brand.retrieve,
)
self.ai_product = to_streamed_response_wrapper(
brand.ai_product,
)
self.ai_products = to_streamed_response_wrapper(
brand.ai_products,
)
Expand Down Expand Up @@ -3406,6 +3509,9 @@ def __init__(self, brand: AsyncBrandResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
brand.retrieve,
)
self.ai_product = async_to_streamed_response_wrapper(
brand.ai_product,
)
self.ai_products = async_to_streamed_response_wrapper(
brand.ai_products,
)
Expand Down
2 changes: 2 additions & 0 deletions src/brand/dev/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
from .brand_ai_query_params import BrandAIQueryParams as BrandAIQueryParams
from .brand_prefetch_params import BrandPrefetchParams as BrandPrefetchParams
from .brand_retrieve_params import BrandRetrieveParams as BrandRetrieveParams
from .brand_ai_product_params import BrandAIProductParams as BrandAIProductParams
from .brand_ai_query_response import BrandAIQueryResponse as BrandAIQueryResponse
from .brand_prefetch_response import BrandPrefetchResponse as BrandPrefetchResponse
from .brand_retrieve_response import BrandRetrieveResponse as BrandRetrieveResponse
from .brand_screenshot_params import BrandScreenshotParams as BrandScreenshotParams
from .brand_styleguide_params import BrandStyleguideParams as BrandStyleguideParams
from .brand_ai_products_params import BrandAIProductsParams as BrandAIProductsParams
from .brand_ai_product_response import BrandAIProductResponse as BrandAIProductResponse
from .brand_screenshot_response import BrandScreenshotResponse as BrandScreenshotResponse
from .brand_styleguide_response import BrandStyleguideResponse as BrandStyleguideResponse
from .brand_ai_products_response import BrandAIProductsResponse as BrandAIProductsResponse
Expand Down
20 changes: 20 additions & 0 deletions src/brand/dev/types/brand_ai_product_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Required, Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["BrandAIProductParams"]


class BrandAIProductParams(TypedDict, total=False):
url: Required[str]
"""The product page URL to extract product data from."""

timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
"""Optional timeout in milliseconds for the request.

Maximum allowed value is 300000ms (5 minutes).
"""
59 changes: 59 additions & 0 deletions src/brand/dev/types/brand_ai_product_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["BrandAIProductResponse", "Product"]


class Product(BaseModel):
"""The extracted product data, or null if not a product page"""

description: str
"""Description of the product"""

features: List[str]
"""List of product features"""

name: str
"""Name of the product"""

tags: List[str]
"""Tags associated with the product"""

target_audience: List[str]
"""Target audience for the product (array of strings)"""

billing_frequency: Optional[Literal["monthly", "yearly", "one_time", "usage_based"]] = None
"""Billing frequency for the product"""

category: Optional[str] = None
"""Category of the product"""

currency: Optional[str] = None
"""Currency code for the price (e.g., USD, EUR)"""

image_url: Optional[str] = None
"""URL to the product image"""

price: Optional[float] = None
"""Price of the product"""

pricing_model: Optional[Literal["per_seat", "flat", "tiered", "freemium", "custom"]] = None
"""Pricing model for the product"""

url: Optional[str] = None
"""URL to the product page"""


class BrandAIProductResponse(BaseModel):
is_product_page: Optional[bool] = None
"""Whether the given URL is a product detail page"""

platform: Optional[Literal["amazon", "tiktok_shop", "etsy", "generic"]] = None
"""The detected ecommerce platform, or null if not a product page"""

product: Optional[Product] = None
"""The extracted product data, or null if not a product page"""
Loading