How to using api integration guide
1. Endpoint Basics
Item
Value
List Available Models
curl http://<server-ip>:8000/v1/models \
-H "Authorization: Bearer sk-your-key"2. curl
Basic Chat Completion
curl http://<server-ip>:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-key" \
-d '{
"model": "Qwen/Qwen2.5-7B-Instruct-AWQ",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain Docker in one sentence."}
],
"temperature": 0.7,
"max_tokens": 256
}'Extract Just the Answer (with jq)
Install the OpenAI SDK
3. Python
Basic Chat
Multi-Turn Conversation
Using requests (no SDK)
4. JavaScript / Node.js
Basic Chat
Using fetch (no SDK)
5. Streaming Responses
Python (streaming)
JavaScript (streaming)
curl (streaming)
6. Embeddings API
Python
curl
7. Common Parameters
Parameter
Type
Description
Recommended Settings by Use Case
Use Case
temperature
Notes
JSON Output
8. Error Handling
Python
Common Errors
Error
Cause
Fix
Set Client Timeout
Quick Reference
Language
SDK Install
Import
Was this helpful?