मुखपृष्ठ / टेक्स्ट ऑप्टिमाइज़ेशन: API मेथड

टेक्स्ट ऑप्टिमाइज़ेशन: API मेथड

लेखक के बैलेंस, लागत, दस्तावेज़ बनाने और ऑप्टिमाइज़ेशन का नतीजा पढ़ने के लिए HTTP मेथड। पैरामीटर और उदाहरण देखें।

इस पेज पर

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

GET /public-api/v1/ai-writer/balance

`ai-writer:read` स्कोप आवश्यक है।

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

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

200

वर्तमान AI Writer क्रेडिट बैलेंस।

{
  "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"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AIWriterBalance"
      }
    }
  }
}

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/optimization/cost

`ai-optimization:read` स्कोप आवश्यक है।

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

अनुरोध

JSON अनुरोध बॉडी 3 MiB (3145728 बाइट) से अधिक नहीं होनी चाहिए।

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

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

200

लागत की जानकारी और वर्तमान बैलेंस।

{
  "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"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/AIWriterOptimizationCost"
          },
          {
            "$ref": "#/components/schemas/AIWriterOptimizationEstimate"
          }
        ]
      }
    }
  }
}

202

क्रेडिट काटे बिना सुझाव तैयार किए जा रहे हैं। लागत की गणना वाला वही अनुरोध दोहराएँ।

{
  "headers": {
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AIWriterOptimizationEstimatePending"
      }
    }
  }
}

413

{
  "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"
      }
    }
  }
}

POST /public-api/v1/ai-writer/optimization/documents

`ai-optimization:write` स्कोप आवश्यक है।

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

पैरामीटर

Idempotency-Key (header)

उसी पूर्ण अनुरोध की प्रतिक्रिया 24 घंटे तक दोहराने के लिए वैकल्पिक कुंजी।

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

अनुरोध

JSON अनुरोध बॉडी 3 MiB (3145728 बाइट) से अधिक नहीं होनी चाहिए।

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

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

202

ऑप्टिमाइज़ेशन स्वीकार किया गया।

{
  "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"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AIWriterOptimizationStart"
      }
    }
  }
}

422

अपर्याप्त AI Writer क्रेडिट।

{
  "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"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AIWriterOptimizationCost"
      }
    }
  }
}

413

{
  "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"
      }
    }
  }
}

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/optimization/documents/{document_id}

`ai-optimization:read` स्कोप आवश्यक है।

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

पैरामीटर

document_id (path)

{
  "required": true,
  "schema": {
    "type": "string",
    "pattern": "^[0-9a-v]{20}$"
  }
}

content_view (query)

{
  "schema": {
    "type": "string",
    "enum": [
      "both",
      "plain",
      "annotated"
    ],
    "default": "both"
  }
}

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

200

ऑप्टिमाइज़ेशन की वर्तमान स्थिति या परिणाम।

{
  "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"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/AIWriterOptimizationDocument"
      }
    }
  }
}

400

{
  "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"
      }
    }
  }
}

404

{
  "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"
      }
    }
  }
}

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