Dokumentacja API
Dzięki API Do4U korzystasz z tych samych narzędzi co na stronie, bezpośrednio z własnego oprogramowania: streszczanie, porównywanie, odpowiedzi dla obsługi klienta, teksty alternatywne, redagowanie i tłumaczenie. Każde zapytanie przetwarzamy na własnych serwerach w Polsce, w UE.
Adres bazowy: https://do4u.eu/api/v1
Opis OpenAPI 3.1 (JSON) – Opis tego API do odczytu maszynowego dla generatorów kodu i narzędzi takich jak Postman czy Insomnia. Bez klucza.
Uwierzytelnianie
Utwórz klucz w sekcji „Klucze API" w swoim koncie. Wysyłaj go z każdym zapytaniem w nagłówku Authorization: Bearer <klucz> (lub X-API-Key: <klucz>). Zachowaj klucz w tajemnicy i nigdy nie umieszczaj go na stronie internetowej. Możesz go w każdej chwili unieważnić.
Jak to działa
Zadania działają w tle. Tworzysz zadanie i od razu dostajesz jego identyfikator (HTTP 202). Potem pobierasz zadanie, aż status będzie done lub failed. Pytaj co 2–5 sekund; większość zadań trwa kilka sekund.
Endpointy
| GET | /tools | Narzędzia, opcje i Twoje limity danych wejściowych |
| GET | /balance | Twoje saldo kredytów |
| POST | /jobs | Utwórz zadanie (JSON lub multipart/form-data z plikiem obrazu) |
| GET | /jobs/{id} | Stan i wynik zadania |
| DELETE | /key | Unieważnia klucz, którym wysyłasz to zapytanie, na przykład przy odłączaniu integracji. Już utworzone zadania zostaną dokończone. |
| POST | /key/revoke | To samo co DELETE /key, dla klientów, które mogą wysyłać tylko GET i POST. |
Przykład
Utwórz zadanie, a potem pobierz wynik:
curl -X POST https://do4u.eu/api/v1/jobs \
-H "Authorization: Bearer d4u_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"tool": "summarize", "text": "...", "options": {"length": "short"}, "language": "en"}'
HTTP/1.1 202 Accepted
{"id": "8f1c0b6a...", "tool": "summarize", "status": "queued", "model": "do4u-standard",
"credits_estimate": 1, "links": {"self": "https://do4u.eu/api/v1/jobs/8f1c0b6a..."}}
curl https://do4u.eu/api/v1/jobs/8f1c0b6a... -H "Authorization: Bearer d4u_YOUR_KEY"
{"id": "8f1c0b6a...", "tool": "summarize", "status": "done", "model": "do4u-standard", "credits_estimate": 1,
"result": {"summary": "...", "key_points": ["...", "..."]}, "credits": 1,
"notice": "AI-generated, please check before use."}
curl -X POST https://do4u.eu/api/v1/jobs -H "Authorization: Bearer d4u_YOUR_KEY" \
-F tool=alt_text -F language=de -F "text=Product page: hiking boots" -F image=@photo.jpg
Pola zapytania POST /jobs
| tool | Nazwa narzędzia, zobacz tabelę poniżej. Wymagane. |
| text | Tekst wejściowy. Dla compare: tekst A. Dla alt_text: opcjonalny kontekst strony. |
| text_b | Tekst B (tylko compare). |
| url | Publiczna strona do odczytania zamiast tekstu (summarize, accessibility_check). |
| html | Kod HTML strony do sprawdzenia (accessibility_check), do 300 000 znaków. |
| focus_keyword | Opcjonalne słowo kluczowe dla seo_meta. Bez target seo_meta pisze w języku language. |
| faq | Opcjonalne fragmenty FAQ (tylko support_reply). |
| questions | Opcjonalnie dla seo_meta, content_brief i faq_schema: częste pytania odwiedzających jako lista tekstów lub {"text": ..., "count": n} (do 50, wykorzystywanych jest najwyżej 20). faq_schema odpowiada na nie najpierw, jeśli źródło zawiera odpowiedź; visitor_questions w wyniku mówi, co stało się z każdym pytaniem. |
| image | Obraz dla alt_text: pole pliku w multipart/form-data albo base64 / data URI w JSON. JPG, PNG, WebP lub GIF, do 5 MB. |
| image_url | Opcjonalnie dla alt_text zamiast image: publiczny adres obrazu (http lub https; JPEG, PNG, WebP lub GIF; najwyżej 5 MB). Do4U wczytuje go raz w tle. Jeśli to się nie uda, zadanie kończy się błędem image_unavailable i nic nie kosztuje. |
| options | Obiekt z opcjami narzędzia, na przykład {"length": "short"}. |
| language | Język wyniku i uwag: en, de lub pl. Domyślnie en. Przy tłumaczeniu język docelowy to opcja target. |
| no_store | true: dane wejściowe usuwamy zaraz po przetworzeniu, a wynik po pierwszym pobraniu. |
| brand_voice | Opcjonalnie: false wyłącza głos marki dla tego zadania (domyślnie obowiązuje, jeśli jest ustawiony). |
| ai_label | Opcjonalnie: true pokazuje w interfejsie internetowym przy wyniku widoczną informację „Oznaczone jako treść wygenerowana przez AI”, false ją ukrywa. Domyślnie: ustawienie na twoim koncie. Oznaczenie AI odczytywalne maszynowo jest zawsze w wyniku i nie można go wyłączyć: pola ai_generated i generator, komentarz HTML w wynikach HTML, ai_notice przy opisach obrazów. ai_generated ma wartość false, jeśli wynik pochodzi tylko z automatycznych sprawdzeń. |
| callback_url | Opcjonalnie: publiczny adres https, który dostanie podpisany POST, gdy zadanie będzie gotowe (zob. Webhooki). |
| render_js | Opcjonalnie: true najpierw wczytuje stronę z JavaScriptem (strony, które budują treść w przeglądarce; narzędzia z url). Dopłata tylko wtedy, gdy strona naprawdę została tak wczytana; pole render w wyniku mówi, co się stało. |
| no_cache | Opcjonalnie: true zawsze uruchamia nowe zadanie AI. Bez tego pola używamy gotowego, wciąż zapisanego wyniku Twojego konta (lub obszaru roboczego) z tym samym narzędziem, opcjami i danymi wejściowymi: zadanie jest od razu gotowe, from_history ma wartość true i kosztuje 0 % kredytów oryginału. Nigdy przy no_store, nigdy dla url. |
| allow_same_language | Opcjonalnie dla translate, translate_html i translate_file: true tłumaczy także wtedy, gdy tekst jest już w języku docelowym. Bez tego pola takie zadanie odrzucamy z kodem same_language (400) – tylko gdy sprawdzenie jest pewne. |
Bezpieczne ponawianie zapytań (Idempotency-Key)
Wysyłaj przy POST /jobs nagłówek Idempotency-Key, na przykład losowy UUID dla każdego zadania (od 1 do 255 drukowalnych znaków ASCII). Jeśli połączenie się zerwie i wyślesz to samo zapytanie z tym samym Idempotency-Key i tym samym kluczem API w ciągu 24 godz., dostaniesz tę samą odpowiedź: to samo zadanie, bez drugiego zadania i bez drugiego obciążenia. Odpowiedź ma wtedy nagłówek Idempotent-Replayed: true. Do każdego nowego zadania użyj nowej wartości. Jeśli wyślesz tę samą wartość z innym zapytaniem, dostaniesz 422 idempotency_conflict. Błędy nie są zapisywane: po błędzie możesz wysłać zapytanie ponownie z tą samą wartością.
curl -X POST https://do4u.eu/api/v1/jobs \
-H "Authorization: Bearer d4u_YOUR_KEY" \
-H "Idempotency-Key: 5f0c2a8e-7d1b-4c3a-9e2f-1b6d8a4c0e77" \
-H "Content-Type: application/json" \
-d '{"tool": "summarize", "text": "..."}'
Narzędzia i opcje
| Narzędzie | Dane wejściowe | Opcje (pierwsza wartość jest domyślna) | Pola wyniku | Cena |
|---|---|---|---|---|
| moderate_commentSprawdź spam w komentarzach | text | – | classification, reason, suggestion, action, note | zwykle 1–3 kredytów |
| document_htmlZamień dokument na stronę HTML | image, pdf, text | page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | html, plain_text, notes, page, note | zwykle 2–3 kredytów |
| image_textZnajdź tekst w obrazach strony | url | image_index: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | html, plain_text, notes, images, image_index, coverage, note | zwykle 2–3 kredytów |
| pdf_accessibilitySprawdź dostępność pliku PDF | – | checks, pages, truncated, repaired, note, convert_url | zwykle 1–2 kredytów | |
| summarizeStreszczanie | text, url | length: medium | short | long | summary, key_points | zwykle 1–3 kredytów |
| comparePorównywanie | text, text_b | focus: overall | facts | tone | seo | summary, similarities, differences | zwykle 1–3 kredytów |
| support_replyOdpowiedź dla klienta | text, faq | tone: friendly | neutral | formal | reply, concerns, questions | zwykle 1–3 kredytów |
| alt_textTeksty alternatywne | image, text, filename, image_url | – | alt, caption, description, filename, filename_base, extension, language, alt_length, alt_max, alt_status, caption_length, caption_max, caption_status | zwykle 2–3 kredytów |
| rewritePrzeredagowanie | text | style: simpler | shorter | more_formal | more_casual | more_persuasive | easy_to_read | text, changes, language, style_label, readability, easy_check, easy_note, review_status, review_limit, diff | zwykle 1–4 kredytów |
| accessibility_checkSprawdzenie dostępności | url, html | – | summary, page, counts, findings, checks, readability, note | stała: 3 kredyty za zadanie |
| seo_metaTytuł i opis SEO | url, text, focus_keyword, questions | target: en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | variants, current, focus_keyword, limits, keywords, note | stała: 1 kredyt za zadanie |
| translate_htmlTłumaczenie HTML | html | target: en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | html, segments, check, glossary, notes, note, review_status, alignment | zwykle 1–4 kredytów |
| product_descriptionOpisy produktów | text | tone: neutral | friendly | persuasive | formallength: medium | short | longchannel: shop | marketplacetarget: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | svmeta_description: no | yes | products, language, detected_language, channel, format, limits, counts, check, note | zwykle 1–3 kredytów |
| headlinesNagłówki i tematy wiadomości | text | kind: page | newsletter | adtone: neutral | friendly | persuasive | formalcount: 5 | 3 | 8target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | kind, fields, variants, limits, counts, enough, report, language, detected_language, note | stała: 1 kredyt za zadanie |
| faq_schemaFAQ i dane strukturalne | url, text, questions | type: faq | organization | localbusiness | productcount: 8 | 5 | 10target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | type, kind, jsonld, html, valid, faq, fields, checks, counts, unverified, dropped, existing, existing_errors, existing_same, page, language, detected_language, notes, note, visitor_questions | stała: 2 kredyty za zadanie |
| content_briefBrief contentowy | text, audience, questions | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | title, title_length, title_max, title_status, goal, intent, outline, questions, length, markdown, counts, dropped, limits, language, detected_language, notes, note | zwykle 1–2 kredytów |
| review_replyOdpowiedzi na opinie | text, company | stars: 0 | 1 | 2 | 3 | 4 | 5platform: general | google | trustpilot | booking | tripadvisor | airbnb | yelp | app_store | google_playtone: friendly | neutral | formalcount: 3 | 2target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | assessment, variants, limits, platform, stars, tone, counts, dropped, enough, report, hints, checks, language, detected_language, note | zwykle 1–2 kredytów |
| social_postsPosty social media z artykułu | url, text | channels: all | linkedin | facebook | instagram | linkedin+facebook | linkedin+instagram | facebook+instagramtone: friendly | neutral | persuasive | formal | casualvariants: 1 | 2 | 3target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | channels, posts, limits, counts, enough, report, link, link_in_bio, language, detected_language, source, notes, note | zwykle 1–3 kredytów |
| explain_termsWyjaśnianie pojęć | url, text | level: simple | general | expertexamples: no | yestarget: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | terms, level, language, detected_language, source, text_length, text_clipped, counts, dropped, adjusted, limits, other_candidates, checks, markdown, html, notes, note | zwykle 1–3 kredytów |
| extract_dataWyciąganie danych | url, text | types: all | hours | prices | hours+prices | addresses | hours+addresses | prices+addresses | hours+prices+addresses | events | hours+events | prices+events | hours+prices+events | addresses+events | hours+addresses+events | prices+addresses+events | hours+prices+addresses+events | contact | hours+contact | prices+contact | hours+prices+contact | addresses+contact | hours+addresses+contact | prices+addresses+contact | hours+prices+addresses+contact | events+contact | hours+events+contact | prices+events+contact | hours+prices+events+contact | addresses+events+contact | hours+addresses+events+contact | prices+addresses+events+contacttarget: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | kinds, hours, prices, addresses, events, contact, counts, empty, unverified, dropped, limits, source, language, detected_language, notes, note | zwykle 1–3 kredytów |
| redirect_planPlan przekierowań | old_urls, new_urls, old_domain, new_domain | ai: yes | no | old_base, new_base, mappings, counts, unused_new, invalid, dropped, ai, legend, language, domain_ignored, notes, note | zwykle 1–3 kredytów |
| contrast_checkSprawdzanie kontrastu kolorów | colors | level: aa | aaatext_size: normal | large | colors, pairs, counts, invalid, settings, palette_check, legend, language, note | zwykle 1–2 kredytów |
| language_levelPoziom językowy (A1–C1) | text | level: B1 | A1 | A2 | B2 | C1target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | svkeep_terms: no | yes | text, changes, level, language, detected_language, translated, summary, within_guideline, measures, over_guideline, over_count, readability, content, kept_terms, checks, hints, note | zwykle 1–4 kredytów |
| llms_txtGenerator llms.txt | url | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | name, summary, details, file, filename, sections, counts, pages_read, read, existing, dropped, hints, language, detected_language, notes, note | zwykle 1–3 kredytów |
| internal_linksLinkowanie wewnętrzne | text, pages, sitemap_url, page_url | – | links, text, text_is_html, counts, pages, dropped, ai, limits, language, detected_language, timeout, notes, note | zwykle 1–3 kredytów |
| outdated_contentPrzestarzałe treści | url, text, html, reference_date | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | reference_date, reference_date_given, findings, summary, counts, source, dropped, ai, limits, language, detected_language, timeout, notes, note | zwykle 1–3 kredytów |
| inclusive_languageJęzyk inkluzywny i zrozumiały | text | scope: both | exclusion | complexitygender: not_prescribed | neutral | pair | star | colon | brand_voice | language, scope, gender, summary, counts, findings, candidates, measures, applied, changed, revised_text, diff, dropped, checks, hints, note | zwykle 1–3 kredytów |
| review_analysisAnaliza opinii klientów | text | focus: all | criticismtarget: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | format, columns, language, detected_language, focus, counts, selection, stars, period, languages, languages_unknown, personal_data, themes, praise, criticism, page, faq, cited, dropped, limits, hints, notes, note | zwykle 1–3 kredytów |
| ai_visibility_checkSprawdzenie widoczności dla AI | url, text, html, topic, questions | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | coverage, coverage_level, counts, questions, faq_questions, sections, qa_on_page, structured_data, llms_txt, robots_txt, readability, hints, source, topic, dropped, ai, limits, files, language, detected_language, note, how | zwykle 1–3 kredytów |
| events_calendarWydarzenia do kalendarza | url, text, time_zone, year | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | events, counts, unverified, dropped, timezone, year, today, limits, ics, jsonld, filename, source, language, detected_language, notes, note | zwykle 1–3 kredytów |
| product_photoZdjęcie produktu na tekst | image, image_url, text, languages | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | svcategory_list: google | free | language, detected_language, title, title_length, title_max, title_status, short_description, short_length, short_max, short_status, description, description_length, description_max, description_status, bullets, bullets_count, bullets_max_length, bullets_status, alt_text, alt_length, alt_max, alt_status, category_group, attributes, attribute_sources, attribute_list, translations, removed, hints, claims_checked, claims_unchecked, counts, limits, notes, category_list, jsonld, jsonld_check, product_json, check, note | zwykle 2–3 kredytów |
| chart_descriptionOpisuj wykresy i infografiki | image, image_url, text | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | svlength: normal | short | chart_type, title, language, detected_language, alt, alt_length, alt_max, alt_status, description, description_length, description_max, description_status, description_size, axes, data, data_rows, table, data_csv, html, image_text, pie_check, hints, counts, limits, notes, verify_numbers, check, note | zwykle 2–3 kredytów |
| design_feedbackOpinia o projekcie ze zrzutu ekranu | image, image_url, text | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | svdevice: auto | phone | desktop | language, detected_language, device, summary, findings, image, image_basis, counts, removed, hints, limits, notes, estimate, check, note, text, markdown | zwykle 2–3 kredytów |
| job_ad_checkSprawdzanie ogłoszenia o pracę | url, text, html | jurisdiction: auto | eu | de | pltarget: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | language, detected_language, jurisdiction, title, checklist, counts, pay, structure, length, findings, titles, summary, source, text_cut, dropped, ai, hints, note | zwykle 1–3 kredytów |
| green_claims_checkSprawdzanie twierdzeń ekologicznych | url, text, html | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | findings, summary, counts, source, dropped, ai, limits, legal, language, detected_language, timeout, notes, note | zwykle 1–3 kredytów |
| third_party_scanSprawdzanie usług zewnętrznych | url, html | – | url, host, page_from, static_only, counts, consent, groups, cookies, legend, notes, check, note, truncated, checked_at | zwykle 1–2 kredytów |
| broken_link_checkWyszukiwanie uszkodzonych linków | url | resources: yes | noexternal: no | yes | language, url, host, counts, broken, more_broken, redirects, more_redirects, soft, start_soft, suggestions, not_reached, limits, note, truncated | zwykle 1–2 kredytów |
| duplicate_content_checkDuplikaty SEO | url, text | – | language, mode, url, host, summary, counts, findings, passed, hints, thresholds, pages, limits, note, truncated | zwykle 1–2 kredytów |
| hreflang_checkSprawdzanie hreflang | url | – | language, url, counts, findings, pages, matrix, annotations, legend, limits, note | zwykle 1–2 kredytów |
| ai_robots_txtRoboty AI w robots.txt | site_url, robots_txt, groups, crawlers | – | file, file_complete, ai_section, crawlers, counts, source, existing, changes, checks, notes, legend, sources, verified_on, language, note | zwykle 1–2 kredytów |
| faq_from_supportFAQ z wiadomości klientów | text, faq_url | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | format, input_kind, columns, language, detected_language, languages, counts, selection, faq_page, personal_data, topics, gaps, cited, dropped, limits, placeholder, hints, notes, note, export | zwykle 1–3 kredytów |
| price_display_checkSprawdzanie cen | url, text, html | ai: yes | nojurisdiction: auto | de | pl | jurisdiction, jurisdiction_auto, jurisdiction_label, source, price, previous_prices, prior_30_days, unit_prices, quantities, discounts, hints, structured, findings, counts, checks, ai, dropped, legal_sources, language, notes, note | zwykle 1–3 kredytów |
| form_text_checkTeksty formularzy | url, html, error_messages | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | svtone: neutral | friendly | formal | language, detected_language, tone, required_word, forms, errors, counts, criteria, summary, source, dropped, ai, hints, note | zwykle 1–3 kredytów |
| newsletter_checkSprawdzanie newslettera | html, eml, text, subject, preheader | target: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | language, detected_language, input, subject, preheader, checklist, counts, links, links_total, images, eml, pairs, improvements, text_cut, dropped, ai, hints, note | zwykle 1–3 kredytów |
| privacy_policy_matchPorównanie z polityką prywatności | website_url, pages, policy_url, policy_text | – | website, pages, policy, not_in_policy, not_found, matched, categories, counts, dropped, ai, limits, legal, notes, check, note, checked_at | zwykle 1–3 kredytów |
| social_card_checkPodgląd linku w social media | url | – | language, url, counts, preview, findings, tags, images, snippet, guidance, limits, note | zwykle 1–2 kredytów |
| image_performance_checkSprawdzanie obrazów | url | – | language, url, counts, total, formats, lcp, page_findings, summary, images, more_images, legend, limits, note, truncated | zwykle 1–2 kredytów |
| ai_transparency_checkOznaczenia AI według AI Act | url, text, html | chatbot: auto | yes | nomedia: unknown | no | realistic | artistic | illustrativearticles: unknown | no | unreviewed | reviewedtarget: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | language, detected_language, source, answers, checklist, detected, notices, summary, counts, dropped, ai, legal, hints, note | zwykle 1–3 kredytów |
| structured_data_checkSprawdzanie danych strukturalnych | url, html | – | language, url, input, counts, formats, findings, items, rules, visible, limits, truncated, note | zwykle 1–2 kredytów |
| legal_notice_checkSprawdzanie noty prawnej | url, text, html | ai: yes | nojurisdiction: auto | de | pl | jurisdiction, jurisdiction_auto, jurisdiction_basis, jurisdiction_label, source, entity, items, extra, counts, ai, dropped, legal_sources, language, notes, note, truncated | zwykle 1–3 kredytów |
| glossary_builderTworzenie glosariusza | url, text, html, languages | source: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | svmax_pages: 1 | 2 | 3 | 5 | 10 | language, language_name, language_source, targets, target_names, items, existing, counts, pages, reading, source, text_cut, dropped, glossary, hints, note, export | zwykle 1–3 kredytów |
| local_business_checkSprawdzanie danych firmy | url, text | ai: no | yes | language, url, host, mode, country, table, findings, counts, structured, suggestion, handover, pages, failed, not_reached, limits, ai, dropped, notes, note | zwykle 1–2 kredytów |
| consent_preload_checkCo ładuje się przed zgodą? | url | – | url, final_url, host, loaded, counts, timing, consent, groups, cookies, storage, notes, check, law, note, truncated, checked_at | zwykle 1–2 kredytów |
| ai_literacy_policyZasady kompetencji AI (AI Act, art. 4) | text, uses, roles, data, company_name | company_size: 1-9 | 10-49 | 50-249 | 250+sector: general | retail | services | crafts | health | finance | education | public_sector | media | it | manufacturing | tourism | socialreview_months: 12 | 6 | 24language: auto | en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | language, title, sections, training, record_columns, markdown, text, profile, counts, dropped, legal, hints, note | zwykle 1–2 kredytów |
| withdrawal_button_checkSprawdzanie przycisku odstąpienia | url, text, html | ai: yes | nojurisdiction: auto | de | pl | eusubscriptions: auto | yes | no | jurisdiction, jurisdiction_auto, jurisdiction_basis, jurisdiction_label, law, source, subscription, items, candidates, counts, ai, dropped, legal_sources, language, notes, note, truncated | zwykle 1–3 kredytów |
| product_safety_checkKontrola strony produktu (GPSR) | url, text, html | market_language: auto | bg | cs | da | de | el | en | es | fi | fr | hr | hu | it | lt | nl | pl | pt | ro | sk | sl | sv | language, market_language, market_language_label, market_basis, page_language, source, product, manufacturer_seat, items, counts, dropped, ai, hints, notes, legal, legal_sources, note | zwykle 1–3 kredytów |
| website_checkSprawdzenie strony | url | scope: short | full | score, categories, findings, counts, snippet, llms_txt, summary, actions, note | stała: 5 kredytów za zadanie |
| translateTłumaczenie | text | target: en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | sv | translation, notes, review_status, alignment | zwykle 1–4 kredytów |
| proofreadKorekta tekstu | text | text_language: auto | en | de | pl | fr | es | it | pt | nl | cs | sk | uk | ru | bg | ro | hu | sv | da | fi | tr | el | ar | fa | he | hi | zh | ja | ko | th | text, html, language, identical, summary, counts, changed_share, changes, notes, beta, note | zwykle 1–4 kredytów |
| translate_fileTłumaczenie plików językowych | text | target: en | de | pl | fr | es | it | nl | cs | sk | uk | bg | da | el | fi | hr | hu | lt | pt | ro | sl | svscope: auto | all | missingline_endings: lf | crlf | lf_no_final_newline | crlf_no_final_newline | format, target, filename, mime, file, entries, counts, flagged, preview, check, notes, note | zwykle 5–8 kredytów |
Status zadania
queued i running: zadanie trwa (position i wait_seconds pomagają w czekaniu). done: result zawiera pola narzędzia. failed: nic nie zostało pobrane (credits wynosi 0); error.code podaje powód: address_blocked (Do4U nie otwiera tego adresu, na przykład prywatnego lub wewnętrznego; wyślij zamiast tego tekst lub HTML), input_too_large (skróć dane), image_unavailable lub job_failed. expired: wynik nie jest już przechowywany.
Webhooki
Dodaj "callback_url" do POST /api/v1/jobs, a Do4U wyśle podpisany POST (zdarzenie job.finished ze statusem, kredytami i linkiem do wyniku - bez samego wyniku), gdy zadanie będzie gotowe. Tylko adresy publiczne na porcie 80 lub 443; ponawiamy do 6 razy z rosnącymi przerwami.
Przykład: utwórz zadanie z callback_url – oraz żądanie, które Do4U wyśle na ten adres, gdy zadanie będzie gotowe:
curl -X POST https://do4u.eu/api/v1/jobs \
-H "Authorization: Bearer d4u_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"tool": "summarize", "text": "...", "callback_url": "https://example.com/do4u-hook"}'
POST /do4u-hook
Content-Type: application/json
X-Do4U-Event: job.finished
X-Do4U-Signature: t=1793180000,v1=6b1f...
{"event":"job.finished","id":"8f1c0b6a...","tool":"summarize","status":"done","credits":1,
"created":"2026-10-28T10:00:00+01:00","finished":"2026-10-28T10:00:04+01:00","result_url":"https://do4u.eu/api/v1/jobs/8f1c0b6a..."} Sprawdź nagłówek X-Do4U-Signature: t=<czas>,v1=<hex>, gdzie v1 = HMAC-SHA256(sekret, "<czas>.<surowa treść>"). Odrzucaj stare znaczniki czasu (np. starsze niż 5 minut). Twój sekret zaczyna się od whsec_ i znajdziesz go na stronie Klucze API.
// Node.js: rawBody = the request body exactly as received (string)
const crypto = require('crypto');
function do4uSignatureOk(rawBody, header, secret) {
const t = (header.match(/t=(\d+)/) || [])[1];
const v1 = (header.match(/v1=([0-9a-f]{64})/) || [])[1];
if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = crypto.createHmac('sha256', secret).update(t + '.' + rawBody).digest('hex');
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}
// PHP
function do4u_signature_ok(string $raw, string $header, string $secret): bool {
if (!preg_match('/t=(\d+),v1=([0-9a-f]{64})/', $header, $m) || abs(time() - (int)$m[1]) > 300) return false;
return hash_equals(hash_hmac('sha256', $m[1] . '.' . $raw, $secret), $m[2]);
}
$ok = do4u_signature_ok(file_get_contents('php://input'), $_SERVER['HTTP_X_DO4U_SIGNATURE'] ?? '', 'whsec_YOUR_SECRET'); credits.low
Gdy saldo kredytów konta spadnie poniżej progu, Do4U wysyła jednorazowo podpisany POST na adres webhooka konta. Zdarzenie nie zawiera danych osobowych, tylko saldo, próg i czas (UTC). Kolejne przyjdzie dopiero wtedy, gdy znowu dojdą kredyty (zakup, darmowe kredyty miesiąca lub kupon). Podpis i klucz są takie same jak przy job.finished.
POST /do4u-hook
Content-Type: application/json
X-Do4U-Event: credits.low
X-Do4U-Signature: t=1793180000,v1=6b1f...
{"event":"credits.low","balance":18,"threshold":20,"ts":"2026-10-29T10:00:04Z"} Adres i próg ustawisz tutaj: Klucze API
n8n
Gotowy workflow: webhook odbiera wywołanie z Do4U, sprawdza podpis, pobiera wynik i przekazuje go do twojego następnego kroku.
Pobierz szablon dla n8n (JSON)
Szablon jeszcze nieprzetestowany w prawdziwej instancji n8n ani Make – przed użyciem przetestuj sprawdzanie podpisu.
W n8n: Workflows → Import from file. Następnie wpisz swój sekret w węźle „Check signature", a klucz API w „Do4U: get result", aktywuj workflow i użyj adresu Production URL webhooka jako callback_url. Samodzielnie hostowane n8n potrzebuje do sprawdzenia podpisu zmiennej środowiskowej NODE_FUNCTION_ALLOW_BUILTIN=crypto.
Make
- Dodaj moduł Webhooks → Custom webhook jako wyzwalacz i włącz w jego ustawieniach zaawansowanych „JSON pass-through" oraz „Get request headers".
- Użyj adresu tego webhooka jako callback_url.
- Sprawdź podpis: porównaj v1 z nagłówka X-Do4U-Signature z sha256(t + "." + surowa treść; hex; twój sekret).
- Dodaj HTTP → Make a request: GET na result_url z nagłówkiem Authorization: Bearer <Twój klucz API>.
- Użyj pola result w kolejnych modułach.
Szablon jeszcze nieprzetestowany w prawdziwej instancji n8n ani Make – przed użyciem przetestuj sprawdzanie podpisu.
Przepisy: łączenie narzędzi
Przepis uruchamia od 2 do 4 narzędzi jedno po drugim jako jedno zadanie. Wyślij „recipe” zamiast „tool”: nazwę gotowego przepisu albo listę kroków. Tekst trafia do pierwszego kroku; wynik każdego kroku jest tekstem dla następnego. GET /api/v1/recipes pokazuje gotowe przepisy, dostępne narzędzia i pole, które każde narzędzie przekazuje dalej.
curl -X POST https://do4u.eu/api/v1/jobs \
-H "Authorization: Bearer d4u_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"recipe": [{"tool": "summarize", "options": {"length": "short"}},
{"tool": "translate", "options": {"target": "pl"}}], "text": "..."}'
curl -X POST https://do4u.eu/api/v1/jobs \
-H "Authorization: Bearer d4u_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"recipe": "summary_translate_meta", "options": {"target": "pl"}, "text": "..."}' Dostajesz jedną wycenę wszystkich kroków (credits_estimate). Ta kwota jest rezerwowana na początku. Po każdym kroku księgowane jest prawdziwe zużycie, reszta zostaje zarezerwowana do końca, a potem jest zwalniana. Nieudany krok nic nie kosztuje, pozostałe kroki są pomijane, a zakończone już kroki są rozliczane.
HTTP/1.1 202 Accepted
{"id": "3c9e0d1a...", "tool": "recipe", "recipe": null, "status": "queued", "model": "do4u-standard", "credits_estimate": 4,
"steps": [{"n": 1, "tool": "summarize", "credits_estimate": 2}, {"n": 2, "tool": "translate", "credits_estimate": 2}],
"links": {"self": "https://do4u.eu/api/v1/jobs/3c9e0d1a..."}} GET /api/v1/jobs/{id} pokazuje każdy krok ze statusem (pending, queued, running, done, failed, skipped), jego kredytami, uwagą input_shortened, gdy tekst trzeba było skrócić dla następnego narzędzia, oraz wynikiem każdego kroku, gdy przepis się zakończy. Z no_store wyniki są pokazywane jeden raz. callback_url uruchamia się dokładnie raz, na końcu przepisu.
GET https://do4u.eu/api/v1/jobs/3c9e0d1a...
{"id": "3c9e0d1a...", "tool": "recipe", "status": "done", "credits_estimate": 4, "credits": 3, "steps_total": 2,
"steps": [{"n": 1, "tool": "summarize", "status": "done", "credits": 1, "result": {"summary": "...", "key_points": ["..."]}},
{"n": 2, "tool": "translate", "status": "done", "credits": 2, "notices": ["input_shortened"], "result": {"translation": "...", "notes": []}}],
"result": {"translation": "...", "notes": []}} GET https://do4u.eu/api/v1/recipes
Błędy
Błędy mają zawsze tę samą postać: {"error": {"code": "...", "message": "..."}}. Przy 429 i 503 nagłówek Retry-After mówi, ile sekund odczekać.
| Kod | HTTP | Znaczenie |
|---|---|---|
| missing_key | 401 | Nie wysłano klucza API. |
| invalid_key | 401 | Klucz nieznany lub unieważniony. |
| rate_limited | 429 | Zbyt wiele zapytań w tej minucie. |
| invalid_json | 400 | Treść nie jest obiektem JSON. |
| unknown_tool | 400 | Nie ma narzędzia o tej nazwie. |
| invalid_option | 400 | Nieznana opcja lub wartość. |
| invalid_field | 400 | Pole ma niewłaściwy typ. |
| invalid_language | 400 | language nie jest en, de ani pl. |
| empty_input | 400 | Brak tekstu i adresu URL. |
| text_b_required | 400 | compare wymaga text i text_b. |
| input_too_long | 400 | Dane dłuższe niż Twój limit. |
| input_too_large | 400 | Dane za duże na jedno zadanie: skróć je lub podziel na kilka zadań. |
| invalid_url | 400 | Adres URL niedozwolony lub nieczytelny. |
| invalid_image | 400 | Brak obrazu, zły format lub zbyt duży plik. |
| payload_too_large | 413 | Zapytanie większe niż 8 MB. |
| insufficient_credits | 402 | Za mało kredytów. |
| email_not_verified | 402 | Najpierw potwierdź adres e-mail. |
| daily_limit | 429 | Wykorzystano darmowy limit dzienny (website_check, scope short). |
| too_many_open_jobs | 429 | Za dużo otwartych zadań na Twoim koncie. |
| package_required | 403 | Narzędzie wymaga kupionego pakietu. |
| busy | 503 | Kolejka jest pełna, spróbuj za chwilę. |
| tool_unavailable | 503 | Narzędzie jest chwilowo niedostępne. |
| not_found | 404 | Nieznany endpoint lub zadanie. |
| method_not_allowed | 405 | Niewłaściwa metoda HTTP. |
| internal_error | 500 | Błąd po naszej stronie. |
| invalid_idempotency_key | 400 | Idempotency-Key jest pusty, za długi albo ma znaki spoza drukowalnego ASCII. |
| idempotency_conflict | 422 | Ten Idempotency-Key został już użyty z innym zapytaniem. |
| idempotency_in_progress | 409 | Zapytanie z tym Idempotency-Key jest jeszcze przetwarzane. Odczekaj chwilę (Retry-After). |
| idempotency_unavailable | 503 | Idempotency-Key jest teraz niedostępny. Spróbuj ponownie później. |
| same_language | 400 | Tekst jest już w języku docelowym (narzędzia do tłumaczenia). Wyślij allow_same_language: true, aby mimo to przetłumaczyć. |
Limity
- 60 zapytań na minutę na klucz i 120 na konto.
- Jednocześnie otwarte zadania na konto: Free 3, Starter 3, Standard 5, Pro 10, strona i API razem.
- Dane wejściowe: Free 8 000 znaków, płatne pakiety 30 000. Niższe limity narzędzi: compare 20 000, alt_text 1 000, translate 12 000 (compare: oba teksty razem).
- Klucze API: Free 1, Starter 1, Standard 5, Pro 10.
Kredyty
Nowe zadanie pokazuje szacunek (credits_estimate); pobierane jest rzeczywiste zużycie (credits). Nieudane zadania nic nie kosztują. Najpierw zużywane są darmowe kredyty.
Dane
Dane wejściowe i wyniki przechowujemy 7 dni (Free) lub 30 dni (płatne pakiety), potem je usuwamy. Obrazy usuwamy zaraz po przetworzeniu. Wyniki są generowane przez AI: sprawdź je przed użyciem.
Odpowiadaj na e-maile bez zmiany skrzynki
Do4U nie prowadzi skrzynki i nigdy nie przechowuje danych dostępu do twojej poczty. Dwa sposoby, aby mimo to dostawać szkice odpowiedzi:
S1 – Szablon dla n8n lub Make
- Wyzwalacz: nowy e-mail w twojej skrzynce (wyzwalacz IMAP w n8n lub Make – dane dostępu zostają tam)
- POST /api/v1/jobs z tool support_reply, tekstem e-maila i no_store: true
- Odczekaj kilka sekund i pobieraj GET /api/v1/jobs/{id}, aż status będzie done
- Utwórz w skrzynce szkic z tekstem z result.reply (moduł Gmail lub Outlook)
W Make zbudujesz ten sam scenariusz z modułów E-mail (obserwuj e-maile), HTTP (wyślij żądanie), Sleep oraz Gmail lub Outlook (utwórz szkic).
Rozszerzenia Dev i wtyczki sklepowe
Rozpakuj ZIP i przeczytaj instrukcję. Załaduj rozszerzenie lokalnie; wtyczki sprawdź najpierw w sklepie testowym. Wymagany jest własny klucz Dev API. Shopware udostępnia obecnie CLI.