cURL Examples
cURL is the fastest way to separate API issues from SDK, editor plugin, or CLI configuration issues.
List models
bash
curl --fail-with-body https://ai.akaii.top/v1/models \
-H "Authorization: Bearer $AKAI_API_KEY"Send a chat request
bash
curl --fail-with-body https://ai.akaii.top/v1/chat/completions \
-H "Authorization: Bearer $AKAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID_FROM_CONSOLE",
"messages": [{ "role": "user", "content": "Hello" }]
}'Add -i when you need response headers. Remove the Authorization header, complete key, and personal data before sharing output.