النصوص واللهجات أنشئ نصوصاً وعناوين إعلانية عربية أو إنجليزية لمنتجاتك، أو حوّل نصاً عربياً معتمداً إلى واحدة من سبع لهجات عربية.
اللغة واللهجة حقلا تحكم منفصلان
يدعم النص العربي اللهجات السعودية والخليجية والإماراتية والمصرية والفصحى والشامية والعراقية. النص الإنجليزي مدعوم، لكن طلبات الإنجليزية لا تقبل لهجة. تعيد استجابة v1 القيمة `none` في حقل dialect للإنجليزية حفاظاً على توافق نوع الحقل النصي مع العملاء الحاليين.
POST /copy-generations
نص إعلاني عربي باللهجة السعودية استخدم output_language مع market وdialect للحصول على سياق السوق ولهجة صريحة.
curl --request POST \
--url https://www.lahjty.com/api/v1/copy-generations \
--header "Authorization: Bearer $LAHJTY_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: copy-ar-sa-1842" \
--data '{
"type": "ad_copy",
"description": "Weekend offer: 20% off specialty coffee subscriptions",
"output_language": "ar",
"market": "SA",
"dialect": "saudi",
"platform": "whatsapp",
"tone": "warm",
"framework": "aida",
"audience": "specific",
"specific_audience": "Young professionals in Riyadh",
"required_keywords": [
"قهوة مختصة"
],
"excluded_keywords": [
"مجاني"
],
"call_to_action": "اطلب الآن",
"external_customer_id": "merchant-91"
}'
Example response
{
"id": "cpy_01jexample",
"object": "copy_generation",
"request_id": "req_01jexample",
"status": "completed",
"type": "ad_copy",
"output_language": "ar",
"market": "SA",
"dialect": "saudi",
"dialect_source": "explicit",
"variants": [
{
"index": 1,
"content": "خصم 20٪ على اشتراك القهوة المختصة لنهاية الأسبوع. اطلب الآن.",
"keyword_compliance": {
"passed": true,
"missing_required": [],
"matched_excluded": []
}
}
],
"usage": {
"credits_used": 2,
"balance_after": 498
}
}POST /copy-generations
نص إعلاني إنجليزي الإنجليزية مدعومة للنصوص والعناوين. أرسل السوق كسياق ولا ترسل حقل dialect.
curl --request POST \
--url https://www.lahjty.com/api/v1/copy-generations \
--header "Authorization: Bearer $LAHJTY_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: copy-en-ae-1843" \
--data '{
"type": "ad_copy",
"description": "Launch offer for a same-day flower delivery service",
"output_language": "en",
"market": "AE",
"platform": "instagram",
"tone": "warm",
"framework": "pas",
"call_to_action": "Order today",
"external_customer_id": "merchant-92"
}'
Example response
{
"id": "cpy_01jenglishexample",
"object": "copy_generation",
"request_id": "req_01jenglishexample",
"status": "completed",
"type": "ad_copy",
"output_language": "en",
"market": "AE",
"dialect": "none",
"dialect_source": null,
"variants": [
{
"index": 1,
"content": "Fresh flowers, delivered across Dubai today. Order now.",
"keyword_compliance": {
"passed": true,
"missing_required": [],
"matched_excluded": []
}
}
],
"usage": {
"credits_used": 2,
"balance_after": 496
}
}POST /copy-generations
عناوين متعددة غيّر type إلى headlines لإنشاء عناوين قصيرة بدلاً من النص الكامل.
curl --request POST \
--url https://www.lahjty.com/api/v1/copy-generations \
--header "Authorization: Bearer $LAHJTY_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: headlines-ar-ae-1844" \
--data '{
"type": "headlines",
"description": "New premium date gift boxes for Ramadan",
"output_language": "ar",
"market": "AE",
"dialect": "emirati",
"platform": "instagram",
"tone": "premium",
"required_keywords": [
"تمور فاخرة"
]
}'
POST /copy-generations
تحويل اللهجة إلى العراقية التحويل يحافظ على المعنى التجاري للنص العربي ويكلف عملة واحدة.
curl --request POST \
--url https://www.lahjty.com/api/v1/copy-generations \
--header "Authorization: Bearer $LAHJTY_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: convert-iq-1845" \
--data '{
"type": "dialect_conversion",
"description": "قهوتك المفضلة توصلك لين باب البيت. اطلب الآن.",
"output_language": "ar",
"market": "IQ",
"source_dialect": "saudi",
"target_dialect": "iraqi",
"platform": "whatsapp",
"tone": "friendly"
}'
قواعد الكلمات keywords: عبارات مفضلة تُستخدم طبيعياً عندما تكون مفيدة.required_keywords: يجب أن تظهر في كل نسخة معادة.excluded_keywords: يجب ألا تظهر في أي نسخة.تتحقق Lahjty من الكلمات ومن وجود نسخ غير فارغة ومختلفة وحروف عربية أو لاتينية مناسبة، مع محاولة إصلاح واحدة قبل content_rejected. تُرفض استجابة المزود غير المكتملة. لا تثبت هذه الفحوص طلاقة النص أو أصالة اللهجة أو صحة الحقائق. راجع الطلب المحفوظ لمعرفة نتيجة الاسترداد النهائية.