Qwen3-8B-GGUF API (8-Bit)

Powered by unsloth/Qwen3-8B-GGUF via llama-cpp-python

Base URL: http://dreamlongyt-agent.hf.space

Overview

This Hugging Face Space exposes the Qwen3-8B-GGUF (8-Bit Precision) model as a simple REST API. Send a POST request to /generate with your message and receive an AI-generated response.

ℹ️ The model is running in 8-bit (Q8_0) quantization for higher accuracy.

Endpoints

GET /
Returns this documentation page.
POST /generate
Send a message to the Qwen3-8B model and receive a response.

Request Body — POST /generate

Send a JSON body with the following fields:

FieldTypeRequiredDescription
instructions string No Optional system-level instructions for the model.
message string Yes The message to send to the model.
user string No Optional username that identifies who is sending the message.

Prompt Construction

The API constructs the prompt sent to the model as follows:

{instructions}
{user} said {message}

For example, if you send:

{"instructions": "idk", "message": "thisissupermario", "user": "admin"}

The model receives:

idk
admin said thisissupermario

Code Examples

# Python — requests
import requests

url = "http://dreamlongyt-agent.hf.space/generate"
payload = {
    "instructions": "idk",
    "message": "thisissupermario",
    "user": "admin"
}

response = requests.post(url, json=payload)
print(response.json())
# cURL
curl -X POST "http://dreamlongyt-agent.hf.space/generate" \
     -H "Content-Type: application/json" \
     -d '{"instructions":"idk","message":"thisissupermario","user":"admin"}'
// JavaScript — fetch
const response = await fetch("http://dreamlongyt-agent.hf.space/generate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    instructions: "idk",
    message: "thisissupermario",
    user: "admin"
  })
});
const data = await response.json();
console.log(data);

Response

The API returns a JSON object with the following fields:

FieldTypeDescription
response string The AI-generated response from Qwen3-8B.
prompt_used string The exact prompt that was sent to the model.
model string The model identifier used for generation.

Interactive Docs

You can also explore and test the API interactively via the built-in Swagger UI at http://dreamlongyt-agent.hf.space/docs.