First API Call
Sota AI uses an OpenAI-compatible API format. By modifying configurations, you can use the OpenAI SDK to access Sota AI API or use software compatible with OpenAI API.
| Parameter | Value |
|---|---|
| base_url | https://sota-ai.nfshost.com/v1 |
| api_key | Get from API Key page |
Call API using curl
curl https://sota-ai.nfshost.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Your API Key>" \
-d '{
"model": "<Any strings>",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"stream": true
}'Best Practices
| Task Type | Recommendation | Explanation |
|---|---|---|
| Code Completion | Not Recommended | Please choose specialized code completion models |
| Question Answering | Recommended | Best for knowledge Q&A and explaining concepts |
| Text Editing | Recommended | Best for rewriting, polishing, and summarizing |
| Creative Writing | Recommended | Suitable for story generation and content creation |
Usage Query Interface
Check your remaining credits and API call history:
https://sota-ai.nfshost.com/web/usage?key=<Your API Key>The interface returns remaining Credits and the latest 50 historical API call records