Support JSON parameters (content image link or BS64 images (starting from data:image) or title text) and FormData parameters (content binary images) Responsive to optional streaming output, the streaming data format is consistent with the streaming output of the openai language modelPrice: Charged based on model price
Request
Header Params
Body Params application/json
Example
{"content":"How much is cos90 equal to?","model":"gpt-4o","lang":"zh","stream":false}
Request Code 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/answer/generate' \
--header'Authorization: Bearer sk-jls4AaVBGoe1GwZD64qZA1qyKTN1MPHa4NmvH1cT68z7K1Zz' \
--header'Content-Type: application/json' \
--data-raw'{
"content": "How much is cos90 equal to?",
"model": "gpt-4o",
"lang": "zh",
"stream": false
}'