मुखपृष्ठ / उत्पाद विवरण: API मेथड

उत्पाद विवरण: API मेथड

उत्पाद विवरण की लागत, निर्माण और दस्तावेज़ पढ़ने के लिए तीन HTTP मेथड देखें। ज़रूरी फ़ील्ड और JSON जवाब समझें।

इस पेज पर

विषय-सूची से विधि चुनें। HTTP विधि, पथ, अनुमतियाँ, अनिवार्य पैरामीटर और अनुरोध बॉडी जाँचें। schema, properties और $ref वाले JSON ब्लॉक अनुबंध बताते हैं; उन्हें तैयार अनुरोध बॉडी की तरह न भेजें। अनुरोध उदाहरण और उत्तर स्कीमा अलग चिन्हित हैं।

POST /public-api/v1/ai-writer/product-descriptions/cost

कुंजी का ai-product-descriptions:read स्कोप और खाते की public-api-product-descriptions.show अनुमति आवश्यक है। परीक्षण संस्करण test कुंजी के साथ /public-api-test/v1 पर समान पथ प्रत्यय के साथ उपलब्ध है। sandbox में परीक्षण डेटा का उपयोग होता है, AI या वास्तविक शुल्क का नहीं। सामान्य उत्पाद नाम सफल परिणाम देता है; sandbox:product_not_recognized 422 लौटाता है; sandbox:async_product_not_recognized और sandbox:product_description_failed, pending के बाद संबंधित त्रुटि लौटाते हैं। परीक्षण दस्तावेज़ 7 दिनों तक या sandbox रीसेट होने तक उपलब्ध रहते हैं, जो भी पहले हो।

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · ProductDescriptionCost · ProductDescriptionRequest

अनुरोध

अधिकतम 16384 बाइट का JSON बॉडी।

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ProductDescriptionRequest"
      }
    }
  }
}

प्रतिक्रियाएँ

200

वर्तमान परिणाम; लागत अनुमान क्रेडिट आरक्षित या खर्च नहीं करता।

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ProductDescriptionCost"
      }
    }
  }
}

default

कुंजी अनुपस्थित या अमान्य होने पर सीमा हेडर प्रति IP विफल प्रयासों को दर्शाते हैं। प्रमाणीकरण के बाद वे कुंजी या खाते की सीमा दर्शाते हैं। पहले से रोक या काउंटर अनुपलब्ध होने पर हेडर अनुपस्थित हो सकते हैं। X-RateLimit-Reset सेकंड में Unix समय है; 429 पर Retry-After सेकंड में प्रतीक्षा है।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

POST /public-api/v1/ai-writer/product-descriptions/documents

कुंजी का ai-product-descriptions:write स्कोप और खाते की public-api-product-descriptions.show अनुमति आवश्यक है। परीक्षण संस्करण test कुंजी के साथ /public-api-test/v1 पर समान पथ प्रत्यय के साथ उपलब्ध है। sandbox में परीक्षण डेटा का उपयोग होता है, AI या वास्तविक शुल्क का नहीं। सामान्य उत्पाद नाम सफल परिणाम देता है; sandbox:product_not_recognized 422 लौटाता है; sandbox:async_product_not_recognized और sandbox:product_description_failed, pending के बाद संबंधित त्रुटि लौटाते हैं। परीक्षण दस्तावेज़ 7 दिनों तक या sandbox रीसेट होने तक उपलब्ध रहते हैं, जो भी पहले हो।

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · ProductDescriptionCost · ProductDescriptionRejected · ProductDescriptionRequest · ProductDescriptionStart

पैरामीटर

Idempotency-Key (header)

सशुल्क जनरेशन के लिए आवश्यक। समान कुंजी, रूट और बिल्कुल समान अनुरोध बॉडी के लिए 24 घंटे तक वही प्रतिक्रिया लौटाता है। अलग बॉडी पर 409 लौटता है। समवर्ती अनुरोध और अनिश्चित परिणाम वाले प्रारंभ 409 के साथ अवरुद्ध रहते हैं; नई कुंजी से दोबारा प्रयास न करें।

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._:-]+$"
  }
}

अनुरोध

अधिकतम 16384 बाइट का JSON बॉडी।

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ProductDescriptionRequest"
      }
    }
  }
}

प्रतिक्रियाएँ

202

जनरेशन स्वीकार किया गया; लागत आरक्षित ऊपरी सीमा है।

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ProductDescriptionStart"
      }
    }
  }
}

422

अपर्याप्त क्रेडिट या पिछले 7 दिनों में कैश की गई उत्पाद पहचान विफलता (error.code=product_not_recognized, credits_spent=0)। जनरेशन शुरू नहीं होता। पैरामीटर बदलने या बैलेंस बढ़ाने के बाद नया Idempotency-Key उपयोग करें।

{
  "content": {
    "application/json": {
      "schema": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ProductDescriptionCost"
          },
          {
            "$ref": "#/components/schemas/ProductDescriptionRejected"
          }
        ]
      }
    }
  }
}

409

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/ai-writer/product-descriptions/documents/{document_id}

कुंजी का ai-product-descriptions:read स्कोप और खाते की public-api-product-descriptions.show अनुमति आवश्यक है। परीक्षण संस्करण test कुंजी के साथ /public-api-test/v1 पर समान पथ प्रत्यय के साथ उपलब्ध है। sandbox में परीक्षण डेटा का उपयोग होता है, AI या वास्तविक शुल्क का नहीं। सामान्य उत्पाद नाम सफल परिणाम देता है; sandbox:product_not_recognized 422 लौटाता है; sandbox:async_product_not_recognized और sandbox:product_description_failed, pending के बाद संबंधित त्रुटि लौटाते हैं। परीक्षण दस्तावेज़ 7 दिनों तक या sandbox रीसेट होने तक उपलब्ध रहते हैं, जो भी पहले हो।

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · ProductDescriptionDocument

पैरामीटर

document_id (path)

{
  "required": true,
  "schema": {
    "type": "string"
  }
}

प्रतिक्रियाएँ

200

मालिक के उत्पाद विवरण की स्थिति। pending परिणामों की जाँच 10 सेकंड बाद दोबारा करें।

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ProductDescriptionDocument"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

AI परिणाम इस्तेमाल करने से पहले तथ्य, कंपनी या उत्पाद का नाम, भाषा और इनपुट से मेल जाँचें। उत्पन्न HTML प्रकाशन से पहले पढ़ें। तकनीकी सफलता सामग्री की समीक्षा का विकल्प नहीं है।