Spaces:
Running
Running
Download index.html from karmen-beatapi/jev-api: direct link, hf CLI and curl.
- Browser
- Download file 7.07 kB
-
https://huggingface.co/spaces/karmen-beatapi/jev-api/resolve/main/index.html
- Command line
-
hf download hf://spaces/karmen-beatapi/jev-api/index.html
-
curl -L -o index.html https://huggingface.co/spaces/karmen-beatapi/jev-api/resolve/main/index.html
7.07 kB
| <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="Turn an application state and a yes/no question into a JEV Decisions API request."><title>JEV API by BeatAPI</title><style> | |
| :root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#eaf0ff;background:#0b1020}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 80% 0%,#253f7d 0,transparent 40%),#0b1020}a{color:#9dccff}.wrap{max-width:1060px;margin:auto;padding:28px 22px 70px}header{display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #334361;padding-bottom:22px}.brand{font-weight:800;letter-spacing:.12em;text-decoration:none;color:#fff}nav{display:flex;gap:16px;flex-wrap:wrap}h1{font-size:clamp(46px,7vw,84px);line-height:1;letter-spacing:-.06em;margin:76px 0 16px}.lead{font-size:20px;color:#b7c7df;max-width:690px;line-height:1.5}.eyebrow{font-size:13px;letter-spacing:.14em;text-transform:uppercase;color:#75e7d3}.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:42px}.card{background:#121d34;border:1px solid #354966;border-radius:18px;padding:27px}h2{margin:0 0 20px;font-size:20px}label{display:block;margin:20px 0 8px;font-weight:700;font-size:13px}textarea,input,select{width:100%;padding:14px;background:#0a1428;border:1px solid #51637f;color:white;border-radius:9px;font:inherit}textarea{resize:vertical}button,.cta{background:#7ce6d2;color:#0b1020;border:0;border-radius:9px;padding:13px 17px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-block}button:hover,.cta:hover{background:#a5f3e3}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6;color:#dcf1ff;background:#080f1e;border:1px solid #334361;border-radius:10px;padding:17px;min-height:210px}.hint,.note{color:#a9bdd7;line-height:1.6}.links{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.links a{border:1px solid #51637f;border-radius:8px;padding:10px 13px;text-decoration:none}footer{margin-top:38px;color:#9eaec8;font-size:13px;line-height:1.5}@media(max-width:760px){.grid{grid-template-columns:1fr}header{align-items:flex-start;flex-direction:column}}</style></head><body><div class="wrap"><header><a class="brand" href="https://beatapi.io/?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=home">BeatAPI</a><nav><a href="https://docs.beatapi.io/decisions?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=docs">API docs</a><a href="https://beatapi.io/jev-api?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=models">Models</a><a href="https://beatapi.io/dashboard/apikeys?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=key">Get API key</a></nav></header><main><p class="eyebrow">Developer request lab</p><h1>JEV API</h1><p class="lead">Build a typed decision request. Turn an application state and a yes/no question into a JEV Decisions API request.</p><div class="grid"><section class="card"><h2>1 / Configure a request</h2><label for="model">Model ID</label><select id="model"><option value="jev-1.13-free">jev-1.13-free</option></select><label for="prompt">Application state</label><textarea id="prompt" rows="6">A support ticket says a customer was charged twice for the same order.</textarea><label for="question">Decision question</label><textarea id="question" rows="3">Should this ticket be escalated to a billing specialist?</textarea><p class="hint">This page generates code in your browser. It does not send your input or API key to BeatAPI.</p></section><section class="card"><h2>2 / Copy and run locally</h2><pre id="code" aria-live="polite"></pre><button id="copy" type="button">Copy cURL</button><p class="note" id="flow"></p></section></div><div class="links"><a href="https://docs.beatapi.io/decisions?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=docs">Read API docs →</a><a href="https://beatapi.io/jev-api?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=models">View model details →</a><a class="cta" href="https://beatapi.io/dashboard/apikeys?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=key">Get a BeatAPI key →</a></div></main><footer>Built by BeatAPI. Independent third-party integration; no affiliation with the model provider. Confirm enabled models and current pricing before a paid request. No live model output is shown here.</footer></div><script> | |
| const cfg={"title": "JEV API", "subtitle": "Build a typed decision request", "desc": "Turn an application state and a yes/no question into a JEV Decisions API request.", "model": "jev-1.13-free", "endpoint": "/v1/systemone", "docs": "https://docs.beatapi.io/decisions", "models": "https://beatapi.io/jev-api", "kind": "jev", "sample": "A support ticket says a customer was charged twice for the same order.", "question": "Should this ticket be escalated to a billing specialist?", "emoji": "🧭", "links": {"home": "https://beatapi.io/?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=home", "docs": "https://docs.beatapi.io/decisions?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=docs", "models": "https://beatapi.io/jev-api?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=models", "key": "https://beatapi.io/dashboard/apikeys?utm_source=huggingface&utm_medium=space&utm_campaign=jev_api&utm_content=key"}};const $=id=>document.getElementById(id);function render(){const model=$('model').value,prompt=$('prompt').value;let body;if(cfg.kind==='jev')body={model,state:prompt,questions:{decision:{type:'noul',instructions:$('question').value,criteria:{true:'Yes, based on the supplied state.',false:'No, or insufficient evidence.'}}}};else if(cfg.kind==='messages')body={model,max_tokens:1024,messages:[{role:'user',content:prompt}]};else if(cfg.kind==='image'){body={model,prompt,aspect_ratio:'1:1',output_format:'png'};let ref=$('reference').value.trim();if(ref)body.images=[ref]}else body={model,messages:[{role:'user',content:prompt}]};const payload=JSON.stringify(body,null,2);const q=String.fromCharCode(39);const shellPayload=q+payload.split(q).join(q+String.fromCharCode(92)+q+q)+q;$('code').textContent='curl -X POST "https://api.beatapi.io'+cfg.endpoint+'" -H "Authorization: Bearer $BEATAPI_API_KEY" -H "Content-Type: application/json" --data '+shellPayload;$('flow').textContent=cfg.kind==='image'?'After creating the task, save data.id and poll GET /v1/tasks/{task_id}.':'The generated request is a template. Create a key and run it in your own terminal.'}document.querySelectorAll('textarea,input,select').forEach(el=>el.addEventListener('input',render));$('copy').addEventListener('click',async()=>{try{await navigator.clipboard.writeText($('code').textContent);$('copy').textContent='Copied';setTimeout(()=>$('copy').textContent='Copy cURL',1800)}catch{$('copy').textContent='Select the code to copy'}});render();</script></body></html> |