Open API keys and create a key with the scopes you need. You see the key once; keep it secret.
API keysRuns are paid from your account's wallet. Add funds on the Billing page if the balance is low.
BillingSend the model, the prompt and max_credits, the most you agree to pay in US dollars. Add an Idempotency-Key so a retry never charges twice.
Poll the generation until its status is succeeded, failed or canceled. A failed or canceled run is refunded.
Documentationcurl -X POST https://quewd.com/api/v1/generations \
-H "Authorization: Bearer $QUEWD_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"model":"soul-2.0","prompt":"A product on a clean studio table, soft light","max_credits":1}'const response = await fetch("https://quewd.com/api/v1/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.QUEWD_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"model": "soul-2.0",
"prompt": "A product on a clean studio table, soft light",
"max_credits": 1
}),
});
const generation = await response.json();
// Poll GET /api/v1/generations/{id} until status is succeeded, failed or canceled.import os, uuid, requests
response = requests.post(
"https://quewd.com/api/v1/generations",
headers={
"Authorization": f"Bearer {os.environ['QUEWD_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"model": "soul-2.0",
"prompt": "A product on a clean studio table, soft light",
"max_credits": 1
},
)
generation = response.json()
# Poll GET /api/v1/generations/{id} until status is succeeded, failed or canceled.