Generate corresponding Schema through web page and descriptionPrice: Charged according to the model called
Request
Header Params
Authorization
string
required
302.AI API Key
Example:
Bearer {{YOUR_API_KEY}}
Model
string
optional
Default gpt-4o
Example:
gpt-4o-mini
Body Params text/plain
Example
Example:{
"description": "AI model and detailed introduction",
"url": "https://news.302.ai"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.302.ai/302/crawler/generate-schema' \
--header'Authorization: Bearer sk-jls4AaVBGoe1GwZD64qZA1qyKTN1MPHa4NmvH1cT68z7K1Zz' \
--header'Model: gpt-4o-mini' \
--header'Content-Type: text/plain' \
--data-raw'{
"description": "AI model and detailed introduction",
"url": "https://news.302.ai"
}'
Responses
🟢201success
application/json
Body
object{0}
Example
{"schema":{"type":"object","properties":{"model_name":{"type":"string","description":"The name of the AI model"},"description":{"type":"string","description":"Detailed introduction to AI model"},"release_date":{"type":"string","description":"The release date of the large AI model, in the format YYYY-MM-DD"},"views":{"type":"number","description":"The number of views of the article"},"category":{"type":"string","description":"Classification of AI models"}},"required":["model_name","description","release_date","views","category"]}}