Language Models (LLM)
The LLM endpoint provides access to powerful conversational and instructional text models.
POST https://z.os7.site/api/llm/[modelname]
Use this endpoint to generate text responses. Replace [modelname] with a valid model slug (e.g., llama3.1-8b).
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
apikey | string | Yes | Your secret Zapi API key. |
prompt | string | Yes | The core instruction or question you are asking the model. |
systemprompt | string | No | System-level instructions to guide the model’s behavior and persona. |
Example Request
cURL
curl -X POST https://z.os7.site/api/llm/llama3.1-8b \
-H "Content-Type: application/json" \
-d '{
"apikey": "zp_your_secret_api_key",
"prompt": "Explain quantum computing in one sentence.",
"systemprompt": "You are a helpful science teacher."
}'Example Response
JSON Response
{
"status": 200,
"data": {
"text": "Quantum computing is a type of computing that uses quantum mechanics to process complex data much faster than classical computers.",
"model": "llama3.1-8b"
}
}Last updated on