Q: Do you support RAG (Retrieval-Augmented Generation)?
A: Solution provided by the platform:
Self-built RAG: Use our Embedding API to vectorize documents → Store them into your vector database (e.g., Milvus/Pinecone) → Retrieve relevant snippets → Splice into the prompt to call the chat model
Q: Do you support JSON Mode / structured outputs?
A: Yes. Setting response_format={"type": "json_object"} allows the model to output valid JSON:
response = client.chat.completions.create( model="[model_name]", messages=[ {"role": "system", "content": "Please output in JSON format, containing name and age fields"}, {"role": "user", "content": "John Doe, 25 years old"} ], response_format={"type": "json_object"})Note: The system prompt must contain "JSON" related instructions; otherwise, an error may be returned.
Q: What are the specific supported formats for Vision (image understanding)?
A: Two image input methods are supported:
Method 1: Using an image URL
image_by_url = { "type": "image_url", "image_url": { "url": "https://example.com/img.jpg" }}Method 2: Using Base64
image_by_base64 = { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,/9j/4AAQ..." }}Supported formats: JPEG / PNG / GIF / WebP
Size limit per single image: 4 MB
Maximum 1 image per single request
Image Token consumption correlates with resolution; higher resolution images consume more Tokens
