SDK
cURL
Run smoke tests, CI probes, and incident checks with cURL.
Install and configure
macOS, Linux, and most CI runners include cURL. Windows users can use PowerShell, Git Bash, or WSL.
export UOUODUO_BASE_URL="https://uouo.cloud/v1"
export UOUODUO_API_KEY="sk-xxx..."List models
curl "$UOUODUO_BASE_URL/models" \
-H "Authorization: Bearer $UOUODUO_API_KEY"Chat Completions
curl "$UOUODUO_BASE_URL/chat/completions" \
-H "Authorization: Bearer $UOUODUO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{ "role": "user", "content": "Reply with one short greeting." }
]
}'Streaming
curl -N "$UOUODUO_BASE_URL/chat/completions" \
-H "Authorization: Bearer $UOUODUO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"stream": true,
"messages": [{ "role": "user", "content": "Explain SSE in one paragraph." }]
}'`-N` disables output buffering so you can watch SSE chunks arrive.
Embeddings
curl "$UOUODUO_BASE_URL/embeddings" \
-H "Authorization: Bearer $UOUODUO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": ["First document", "Second document"]
}'Troubleshooting
- `401`: the key is missing, invalid, disabled, or expired.
- `404`: the endpoint path or model ID is wrong.
- `429`: rate limit, quota, or balance issue.
- `5xx`: upstream or gateway issue; record the request time, model, and payload summary.