POST /v1/prompt
Run an LLM prompt and get back text. Optionally pass a URL to ground the prompt on a live web page.
curl -X POST https://api.chuger.com/v1/prompt \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a one-paragraph summary of the Apollo program."
}'
const res = await fetch('https://api.chuger.com/v1/prompt', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CHUGER_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt: 'Write a one-paragraph summary of the Apollo program.',
}),
});
curl -X POST https://api.chuger.com/v1/prompt \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Summarize the key arguments in this article in 3 bullet points.",
"url": "https://example.com/blog/long-essay"
}'
const res = await fetch('https://api.chuger.com/v1/prompt', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CHUGER_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt: 'Summarize the key arguments in this article in 3 bullet points.',
url: 'https://example.com/blog/long-essay',
}),
});
{
"response": "The article argues that... It cites... Finally, it concludes..."
}
{
"message": "Failed to generate response using available LLM services."
}
Run an LLM prompt and get back text. Optionally pass a URL to ground the prompt on a live web page — Chuger will fetch and extract that page's content, attach it to your prompt as context, and return the model's answer.
POST https://api.chuger.com/v1/prompt
Authentication
Bearer token in the Authorization header. See Authentication.
Cost
| Plan | Credits per request |
|---|---|
| Basic | 10 |
| Pro | 10 |
| Business | 10 |
Credits are only deducted on success.
If you supply a url, Chuger transparently does the content extraction for you — there is no additional charge for the extraction; the prompt rate covers the whole call.
Request body
Content-Type: application/json
The instruction or question for the LLM. Must be non-empty.
If provided, the page is fetched and its content is included as context. HTTP/HTTPS, max 180 characters, no raw IPs or non-default ports.
Examples
Response fields
The model's text answer.
Errors
| Status | When |
|---|---|
401 | Missing / invalid token |
402 | No plan, or insufficient credits |
422 | prompt missing or empty, url malformed/too long/raw IP/non-default port |
429 | Rate limit or monthly quota exceeded |
503 | Could not produce a response |
See Errors for the full reference.
Tips
Keep prompts focused — shorter, more specific instructions yield more reliable answers. When you pass a url, Chuger does its best to give the model the cleanest possible version of the page, but heavily JavaScript-driven sites may still surface only partial content.
Treat the response as text. There is currently no streaming or structured-output mode on this endpoint.