Connect Curl & HTTP to Unsloth
Guide to hitting Unsloth's API with curl (or any HTTP client), complete with copy-pasteable recipes for every endpoint and feature..
🔑 Authentication
Authorization: Bearer sk-unsloth-xxxxxxxxxxxxexport UNSLOTH_STUDIO_AUTH_TOKEN=sk-unsloth-xxxxxxxxxxxx📋 List loaded models
curl http://localhost:8888/v1/models \
-H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx"{
"object": "list",
"data": [
{"id": "unsloth/gemma-3-27b-it-GGUF", "object": "model", "owned_by": "local"}
]
}
💬 Chat Completions (/v1/chat/completions)
/v1/chat/completions)Basic request

Streaming

Images (vision)

Function calling (OpenAI tools)

📨 Anthropic Messages (/v1/messages)
/v1/messages)Basic request

Streaming
Images (vision)

Tool calling (Anthropic tools)

🧬 Responses (/v1/responses)
/v1/responses)

🧰 Unsloth server-side tools (shorthand)
Field
Type
Notes
Thinking mode


Python execution

Web search + Python (streaming)

On /v1/messages
/v1/messages
❔ Troubleshooting
Last updated
Was this helpful?

