allegro / allegro/allegro-api

[NEWS] Oznaczanie zdjęć AI (AI Act) – dodajemy oraz rozszerzamy strukturę aiCoCreatedContent o pole images / AI Image Labeling (AI Act)- we are adding and extending the aiCoCreatedContent structure with the images field

Ouverte
#13,729 2 commentaires 0 réactions 1 personne assignée Réclamée par @Aureliusz-Brussy Voir sur GitHub
News Offer - images and attachments Offer - management
Langage dominant
Aucune donnée de langage
Étoiles
244
Forks
40
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

W związku z wejściem w życie unijnego Aktu o sztucznej inteligencji ([**AI Act**](https://digital-strategy.ec.europa.eu/pl/policies/regulatory-framework-ai)), **od 2 sierpnia 2026 roku** na sprzedawców zostanie nałożony obowiązek informowania kupujących o tym, czy zdjęcia w ofercie zostały wygenerowane lub istotnie zmodyfikowane przez AI (czyli spełniają ustawową definicję deepfake).

Aby umożliwić **Tobie i Twoim** użytkownikom realizację tego obowiązku prawnego, wprowadzamy zmiany w zasobach Katalogu Produktów, zarządzaniu ofertami oraz wgrywaniu zdjęć. Modyfikacje zostały zaprojektowane tak, aby zachować **pełną kompatybilność wsteczną**.

### Jakie zmiany wprowadzimy?

Dodajemy strukturę `aiCoCreatedContent` do requestów tworzących ofertę i rozszerzymy ją o tablicę obiektów `images`, która docelowo będzie przechowywać listę adresów URL zdjęć zadeklarowanych jako wygenerowane przez sztuczną inteligencję.

**Ważna informacja:** Tablica `images` została już przez nas wdrożona w strukturach odpowiedzi i żądań, jednak **tymczasowo nie będzie obsługiwana i będzie zwracać zawsze pustą tablicę obiektów `[]`**. Udostępniamy ją, dlatego możesz sprawdzić, jakie zmiany w strukturze payloadu wprowadzimy i już teraz dostosować swoją aplikację. O tym, kiedy pole stanie się w pełni funkcjonalne, poinformujemy w następnej komunikacji.

Modyfikacja dotyczy następujących endpointów:

* [POST /sale/product-offers](https://developer.allegro.pl/documentation#tag/Offer-management/operation/createProductOffers)
* [PATCH /sale/product-offers/{id}](https://developer.allegro.pl/documentation#tag/Offer-management/operation/editProductOffers)
* [GET /sale/product-offers/{id}](https://developer.allegro.pl/documentation#tag/User's-offer-information/operation/getProductOffer)
* [GET /sale/products](https://developer.allegro.pl/documentation#tag/Products/operation/getSaleProducts)
* [GET /sale/products/{productId}](https://developer.allegro.pl/documentation#tag/Products/operation/getSaleProduct)
* [POST /sale/product-proposals](https://developer.allegro.pl/documentation#tag/Products/operation/proposeSaleProduct)
* [POST /sale/images](https://developer.allegro.pl/documentation#tag/Images-and-attachments/operation/uploadOfferImageUsingPOST)

### Ważne zasady techniczne

Podczas dostosowywania swojej aplikacji **zwróć szczególną uwagę** na poniższą logikę działania systemu:

* **Deklaracja podczas dodawania** \- informację o tym, czy zdjęcie zostało wygenerowane lub istotnie zmodyfikowane przez AI, można przekazać **podczas pierwszego dodawania (uploadu/przesyłania) zdjęcia** do platformy. Po dodaniu pliku nie zmienisz tej deklaracji przez API.
* **Zdjęcia z zewnętrznych źródeł** \- jeśli przesyłasz nowe zdjęcie z zewnętrznego adresu URL i wskażesz je w sekcji `aiCoCreatedContent.images`, **system oznaczy je w bazie jako wygenerowane przez AI**.
* **Zdjęcia istniejące już w bazie** \- jeśli używasz zdjęcia, które znajduje się już w bazie Allegro, Twoja **deklaracja w żądaniu zostanie pominięta**. System bazuje na pierwotnym oznaczeniu pliku, które otrzymasz w response.
* **Domyślny brak AI** \- jeśli nie wskażesz danego zdjęcia w tablicy `aiCoCreatedContent.images` lub pominiesz parametry oznaczania przy nowo wgrywanych plikach, system domyślnie uzna, że na zdjęciu nie należy wyświetlać oznaczenia AI.
* Na zdjęciach dodanych do Allegro, które zostały wygenerowane lub istotnie zmodyfikowane przez AI, dodamy znak wodny “AI”.

### Zarządzanie ofertami

Do struktury żądania oraz odpowiedzi dodajemy sekcję `aiCoCreatedContent`, a w niej tablicę obiektów `images`. **Przekażesz** lub otrzymasz w niej adresy URL zdjęć stworzonych przy użyciu AI. Dotyczy to:

* [POST /sale/product-offers](https://developer.allegro.pl/documentation#tag/Offer-management/operation/createProductOffers)
* [PATCH /sale/product-offers/{id}](https://developer.allegro.pl/documentation#tag/Offer-management/operation/editProductOffers)
* [GET /sale/product-offers/{id}](https://developer.allegro.pl/documentation#tag/User's-offer-information/operation/getProductOffer)

**Przykładowy fragment requestu:**

```json5
{
"productSet": [
{
"quantity": {
"value": 1
},
"product": {
"id": "c9e39cae-9cb6-11e9-a2a3-2a2ae2dbcce4",
(...)
}
],
"id": "12394584234",
"name": "Test offer name",
"category": {
"id": "257931"
},
(...),
"images": [
"https://...adres-pierwszego-obrazka.jpeg",
"https://...adres-drugiego-obrazka.jpeg"
],
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "

opis oferty

"
},
{
"type": "IMAGE",
"url": "https://...adres-drugiego-obrazka.jpeg"
}
]
}
]
},
"aiCoCreatedContent": { // nowa sekcja definiująca zawartość współtworzoną przez AI
"images": [ // tablica zdjęć, które zostaną oznaczone jako wygenerowane lub istotnie zmodyfikowane przez AI
{
"url": "https://...adres-drugiego-obrazka.jpeg" // url zdjęcia z galerii zdjęć produktu, które zostanie oznaczone jako wygenerowane lub istotnie zmodyfikowane przez AI
}
]
}
}
```

### Katalog Produktów

W response rozszerzamy strukturę `aiCoCreatedContent` o tablicę obiektów `images`. Brak danego zdjęcia w tej tablicy oznacza, że nie zostało ono zadeklarowane jako stworzone przez AI. Dotyczy to:

- [GET /sale/products](https://developer.allegro.pl/documentation#tag/Products/operation/getSaleProducts)
- [GET /sale/products/{productId}](https://developer.allegro.pl/documentation#tag/Products/operation/getSaleProduct)

Dla [POST /sale/product-proposals](https://developer.allegro.pl/documentation#tag/Products/operation/proposeSaleProduct) w żądaniu **ignorujemy** oznaczenie AI (nie musisz go tu przesyłać, jednak system nie zwróci błędu, jeśli się pojawi). Dla tego endpointu przekazujesz zdjęcie wgrane za pomocą [POST /sale/images](https://developer.allegro.pl/documentation#tag/Images-and-attachments/operation/uploadOfferImageUsingPOST) i to na tamtym etapie następuje deklaracja o użyciu AI. W response dodamy strukturę `aiCoCreatedContent` wraz z tablicą obiektów `images`, aby zapewnić spójność danych.

**Przykładowy fragment response’a:**

```json5
{
...
"id": "c9e39cae-9cb6-11e9-a2a3-2a2ae2dbcce4",
"name": "iPhone 5s",
"images": [
{
"url": "https://...adres-pierwszego-obrazka.jpeg"
},
{
"url": "https://...adres-drugiego-obrazka.jpeg"
}
]
...
"aiCoCreatedContent": {
"paths": [
"images",
"description"
],
"images": [ // nowa tablica zdjęć, które zostały oznaczone jako wygenerowane lub istotnie zmodyfikowane przez AI
{
"url": "https://...adres-drugiego-obrazka.jpeg" // url zdjęcia oznaczonego jako wygenerowane lub istotnie zmodyfikowane przez AI
}
]
}
...
}

```

### Wgrywanie zdjęć

Zmiany wdrożymy również na endpoincie służącym do bezpośredniego przesyłania zdjęć: [POST /sale/images](https://developer.allegro.pl/documentation#tag/Images-and-attachments/operation/uploadOfferImageUsingPOST). Wprowadzimy tam dwa nowe rozwiązania:

* **Nowy query parametr:** `isAiCoCreated=true/false` \- będzie działać dla wszystkich obsługiwanych typów `Content-Type` (w tym również dla `application/vnd.allegro.public.v1+json`),
* **Nowe pole w body żądania:** `"isAiCoCreated": true/false` \- będzie dostępne wyłącznie przy zastosowaniu nagłówka `Content-Type: "application/vnd.allegro.public.v1+json"`.

### Co grozi za brak oznaczenia?

Zgodnie z przepisami AI Act, jeśli nie umożliwisz sprzedawcy dopełnienia obowiązku transparentności wobec konsumentów, grożą Ci surowe administracyjne kary pieniężne, które dla dużych przedsiębiorstw mogą wynieść do 15 mln euro lub do 3% całkowitego światowego rocznego obrotu z poprzedniego roku obrotowego.

### Dlaczego wprowadzamy tę zmianę?

Nowe prawo unijne ma na celu ochronę konsumentów i budowanie zaufania do informacji w sieci. Kupujący podejmują decyzje zakupowe m.in. na podstawie zdjęć, dlatego muszą mieć jasność, czy oglądają autentyczną fotografię produktu, czy komputerową, fotorealistyczną wizualizację.

Sprzedawca odpowiada za treści publikowane w ofertach, w tym za materiały dostarczane przez agencje, grafików czy hurtownie. Zapowiadane zmiany w API pozwolą sprzedawcom i integratorom działać zgodnie z prawem i uniknąć wysokich kar.

**Dostosuj swoją** integrację jak najszybciej, przed **2 sierpnia 2026 roku**, aby zapewnić użytkownikom nieprzerwane i bezpieczne zarządzanie ofertami.

Więcej informacji oraz odpowiedzi na najczęściej zadawane pytania znajdziesz w [Pomocy dla sprzedającego](https://help.allegro.com/pl/sell/a/oznaczanie-zdjec-wygenerowanych-lub-zmodyfikowanych-za-pomoca-ai-najczesciej-zadawane-pytania-lLPlveB2RhE).

------

Due to the entry into force of the EU Artificial Intelligence Act ([**AI Act**](https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai)), **as of August 2, 2026**, sellers will be required to inform buyers whether the images in an offer were generated or significantly modified by AI (meaning they meet the statutory definition of a deepfake).

To enable **you and your** users to fulfill this legal obligation, we are introducing changes to Product Catalog resources, offer management, and image uploading. The modifications are designed to maintain **full backward compatibility**.

### What changes are we introducing?

We are adding the `aiCoCreatedContent` structure to offer creation requests and extending it with an `images` array of objects, which will ultimately store the list of URLs for images declared as generated by artificial intelligence.

**Important information:** The `images` array has already been deployed in our request and response structures; however, **it will temporarily not be supported and will always return an empty array of objects `[]`**. We are making it available so that you can verify the upcoming payload structure changes and adapt your application right away. We will inform you when the field becomes fully functional in a future communication.

The modification applies to the following endpoints:

* [POST /sale/product-offers](https://developer.allegro.pl/documentation#tag/Offer-management/operation/createProductOffers)
* [PATCH /sale/product-offers/{id}](https://developer.allegro.pl/documentation#tag/Offer-management/operation/editProductOffers)
* [GET /sale/product-offers/{id}](https://developer.allegro.pl/documentation#tag/User's-offer-information/operation/getProductOffer)
* [GET /sale/products](https://developer.allegro.pl/documentation#tag/Products/operation/getSaleProducts)
* [GET /sale/products/{productId}](https://developer.allegro.pl/documentation#tag/Products/operation/getSaleProduct)
* [POST /sale/product-proposals](https://developer.allegro.pl/documentation#tag/Products/operation/proposeSaleProduct)
* [POST /sale/images](https://developer.allegro.pl/documentation#tag/Images-and-attachments/operation/uploadOfferImageUsingPOST)

### Important technical rules

When adapting your application, **pay special attention** to the following system logic:

* **Declaration upon adding** \- information on whether an image was generated or significantly modified by AI can be provided **during the initial addition (upload) of the image** to the platform. Once the file is added, you will not be able to change this declaration via the API.
* **Images from external sources** \- if you send a new image from an external URL and specify it in the `aiCoCreatedContent.images` section, **the system will mark it in the database as AI-generated**.
* **Images already existing in the database** \- if you use an image that is already in the Allegro database, your **declaration in the request will be ignored**. The system relies on the file's original marking, which you will receive in the response.
* **Default absence of AI** \- if you do not specify a given image in the `aiCoCreatedContent.images` array or omit the labeling parameters for newly uploaded files, the system will assume by default that the AI label should not be displayed on the image.
* We will add an "AI" watermark to images added to Allegro that have been generated or significantly modified by AI.

### Offer management

We are adding the `aiCoCreatedContent` section to both the request and response structures, containing the `images` array of objects. In it, you will **pass** or receive the URLs of images created using AI. This applies to:

* [POST /sale/product-offers](https://developer.allegro.pl/documentation#tag/Offer-management/operation/createProductOffers)
* [PATCH /sale/product-offers/{id}](https://developer.allegro.pl/documentation#tag/Offer-management/operation/editProductOffers)
* [GET /sale/product-offers/{id}](https://developer.allegro.pl/documentation#tag/User's-offer-information/operation/getProductOffer)

**Example request fragment:**

```json5
{
"productSet": [
{
"quantity": {
"value": 1
},
"product": {
"id": "c9e39cae-9cb6-11e9-a2a3-2a2ae2dbcce4",
"idType": "GTIN"
}
}
],
"id": "12394584234",
"name": "Test offer name",
"category": {
"id": "257931"
},
"images": [
"https://...address-of-the-first-image.jpeg",
"https://...address-of-the-second-image.jpeg"
],
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "

offer description

"
},
{
"type": "IMAGE",
"url": "https://...address-of-the-second-image.jpeg"
}
]
}
]
},
"aiCoCreatedContent": { // new section defining content co-created by AI
"images": [ // array of images that will be marked as generated or significantly modified by AI
{
"url": "https://...address-of-the-second-image.jpeg" // URL of the image from the product gallery that will be marked as generated or significantly modified by AI
}
]
}
}
```

### Product Catalog

In the response, we are extending the `aiCoCreatedContent` structure with the `images` array of objects. The absence of a given image in this array means it has not been declared as AI-created. This applies to:

* [GET /sale/products](https://developer.allegro.pl/documentation#tag/Products/operation/getSaleProducts)
* [GET /sale/products/{productId}](https://developer.allegro.pl/documentation#tag/Products/operation/getSaleProduct)

For [POST /sale/product-proposals](https://developer.allegro.pl/documentation#tag/Products/operation/proposeSaleProduct), we **ignore** the AI designation in the request (you do not need to send it here; however, the system will not return an error if it appears). For this endpoint, you pass an image uploaded via [POST /sale/images](https://developer.allegro.pl/documentation#tag/Images-and-attachments/operation/uploadOfferImageUsingPOST), and the AI usage declaration occurs at that stage. In the response, we will add the `aiCoCreatedContent` structure along with the `images` array of objects to ensure data consistency.

**Example response fragment:**

```json5
{
"id": "c9e39cae-9cb6-11e9-a2a3-2a2ae2dbcce4",
"name": "iPhone 5s",
"images": [
{
"url": "(https://...address-of-the-first-image.jpeg"
},
{
"url": "https://...address-of-the-second-image.jpeg"
}
],
"aiCoCreatedContent": {
"paths": [
"images",
"description"
],
"images": [ // new array of images that have been marked as generated or significantly modified by AI
{
"url": "https://...address-of-the-second-image.jpeg" // URL of the image marked as generated or significantly modified by AI
}
]
}
}
```

### Image upload

We will also implement changes on the endpoint used for direct image uploads: [POST /sale/images](https://developer.allegro.pl/documentation#tag/Images-and-attachments/operation/uploadOfferImageUsingPOST). We will introduce two new options there:

* **New query parameter:** `isAiCoCreated=true/false` \- will work for all supported `Content-Type` types (including `application/vnd.allegro.public.v1+json`),
* **New field in the request body:** `"isAiCoCreated": true/false` \- will be available exclusively when using the `Content-Type: "application/vnd.allegro.public.v1+json"` header.

### What are the penalties for failing to label?

According to the AI Act regulations, if you do not enable the seller to fulfill their transparency obligation towards consumers, you may face severe administrative fines, which for large enterprises can reach up to €15 million or up to 3% of the total worldwide annual turnover of the preceding financial year.

### Why are we introducing this change?

The new EU law aims to protect consumers and build trust in online information. Buyers make purchasing decisions based on images, among other things, so they must be clear about whether they are looking at an authentic product photograph or a computer-generated, photorealistic visualization.

The seller is responsible for the content published in offers, including materials provided by agencies, graphic designers, or wholesalers. The announced API changes will allow sellers and integrators to operate in compliance with the law and avoid heavy fines.

**Adapt your** integration as soon as possible, before **August 2, 2026**, to ensure uninterrupted and secure offer management for users.

You can find more information and answers to frequently asked questions in the [Help for sellers article](https://help.allegro.com/en/sell/a/labeling-ai-generated-or-modified-photos-frequently-asked-questions-E7DG3Ze8qhR).

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.