Stremit API Setup Guide
Connect your Stremit API key to Enclo or any app to unlock AI-powered analysis, semantic search, and the full tools directory.
Setup — Step 1 of 2
Get your API key
Go to your Pulse Dashboard → API Key tab.
Click Reveal then Copy to copy your key to the clipboard.
It looks like: stremit-sk-xxxxxxxx...
Keep it private — anyone with this key can make API calls that spend your token balance.
Setup — Step 2 of 2
Connect to Enclo
Open Enclo on your device.
Go to Settings → Stremit API Key.
Paste your key and tap Verify & Save.
Enclo will call /api/v1/auth/verify
to confirm the key is valid before saving.
Once connected, Enclo uses your key automatically for: auto-tagging saved content, AI summarization, and deep semantic search.
Reference
Authentication
Every request must include your key in the Authorization header.
Optionally pass X-App-Name, X-Device-Type,
and X-Device-Name to identify the calling app and device — they populate the Connected Apps list in your API Key tab.
# Required on every request Authorization: Bearer stremit-sk-your-key-here X-App-Name: Enclo # optional — shows in Connected Apps X-Device-Type: windows # optional — android|ios|windows|mac|linux|web X-Device-Name: My Desktop # optional — friendly device label
Reference
Available endpoints
Base URL: https://stremit.io/api/v1
Account
tokens_used, tokens_remaining, tokens_monthly_cap, tokens_topup, and the monthly reset date. Also includes legacy call counters.Models
GET /models. Accepts model, messages (or prompt), optional system, max_tokens (≤4000), temperature. Returns { model, content, usage }. Token usage is counted against your Stremit balance. 30 req/min.Media Generation
gpt-image-2. Accepts prompt, optional size (1024x1024 · 1536x1024 · 1024x1536). Returns { image_b64, media_type, tokens_charged }. Billed per image against your token balance. Renders take ~40-60s — use a generous timeout. 5 req/min.gpt-4o-mini-tts. Accepts text (≤4000 chars), optional voice (alloy · nova · onyx · sage…), instructions (delivery style), format (mp3 · wav · opus · aac). Returns { audio_b64, media_type, tokens_charged }. Billed per character against your token balance. 10 req/min.AI Features
peer_name, messages, persona. Returns { reply }. 60 req/min.text, tone (casual, formal, friendly…). Returns { result }. 60 req/min.text, target_language. Returns { result }. 60 req/min.instruction, optional host_name, width, height, known_apps, and an optional image (base64 JPEG of the active monitor — lets the model see the screen, target on-screen elements by pixel, and answer questions about what's displayed; adds vision tokens). Returns { commands, answer, clarification } — answer is set when the user asks about the screen rather than requesting an action. 60 req/min.goal, optional package, history, elements (the foreground app's accessibility tree). Returns { action, app, index, text, direction, confirm, reason, summary } — one action at a time (open, tap, type, scroll, back, home, wait, done). 60 req/min.Tools Directory
category, sort, page.Stacks
sort (trending · newest · popular), page, per_page.Strems
sort (trending · newest · top_rated), type (prompt · workflow · agent), category.name, content, agent_type (prompt · workflow · agent), optional tagline, description, category, variables_schema. Pass ai_generate: true with a description to have Claude write the prompt — token usage is counted against your key. Returns { strem }. 10 req/min.variables: {key: value}. Token usage is counted against your key. Returns { result, tokens_used, model }. 30 req/min.Vision
image (base64), media_type (jpeg · png · webp · gif), optional focus hint. Returns { description }. 30 req/min.image (base64), mode (text · table · form · json), optional schema for json mode. Returns { result }. 30 req/min.Reference
Quick example
Verify your key with a single curl call:
# curl curl https://stremit.io/api/v1/auth/verify \ -H "Authorization: Bearer stremit-sk-your-key-here" \ -H "X-App-Name: MyApp"
# Python import requests headers = { 'Authorization': 'Bearer stremit-sk-your-key-here', 'X-App-Name': 'MyApp', } res = requests.get('https://stremit.io/api/v1/auth/verify', headers=headers) print(res.json())
// JavaScript const res = await fetch('https://stremit.io/api/v1/auth/verify', { headers: { 'Authorization': 'Bearer stremit-sk-your-key-here', 'X-App-Name': 'MyApp', }, }); const data = await res.json(); console.log(data);
Reference
Using the models
Your Stremit key gives you direct access to Claude, GPT, and Kimi models through one endpoint.
The flow is simple: pick a model from GET /models,
send your conversation to POST /completions,
and the token usage is deducted from your Stremit balance — the same balance the in-app AI features use.
Available models:
claude-sonnet-5 ·
claude-opus-4-8 ·
claude-haiku-4-5-20251001 ·
gpt-5 ·
gpt-5-mini ·
kimi-k2.6 ·
kimi-k2.5
# curl — simplest form: just a prompt curl https://stremit.io/api/v1/completions \ -H "Authorization: Bearer stremit-sk-your-key-here" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-5", "prompt": "Explain what a REST API is in one paragraph.", "max_tokens": 500 }'
# Python — multi-turn conversation with a system prompt import requests res = requests.post( 'https://stremit.io/api/v1/completions', headers={'Authorization': 'Bearer stremit-sk-your-key-here'}, json={ 'model': 'kimi-k2.6', 'system': 'You are a concise technical writer.', 'messages': [ {'role': 'user', 'content': 'Write a haiku about databases.'}, ], 'max_tokens': 200, 'temperature': 0.8, }, ) data = res.json() print(data['content']) print(data['usage']) # {'input_tokens': ..., 'output_tokens': ..., 'total_tokens': ...}
// JavaScript — passing prior turns for context const res = await fetch('https://stremit.io/api/v1/completions', { method: 'POST', headers: { 'Authorization': 'Bearer stremit-sk-your-key-here', 'Content-Type': 'application/json', }, body: JSON.stringify({ model: 'claude-haiku-4-5-20251001', messages: [ { role: 'user', content: 'Suggest 3 names for a coffee shop app.' }, { role: 'assistant', content: 'BrewMate, SipSpot, DailyDrip' }, { role: 'user', content: 'More playful, please.' }, ], max_tokens: 300, }), }); const data = await res.json(); console.log(data.content);
# Response shape (all languages) { "model": "claude-sonnet-5", "content": "A REST API is...", "usage": { "input_tokens": 18, "output_tokens": 112, "total_tokens": 130 } }
Text to image & text to audio
The same key also generates media. Both endpoints return base64 you decode and save — images are billed per image, audio per character, all against the same token balance.
# Python — text to image (renders take ~40-60s, use a long timeout) import requests, base64 res = requests.post( 'https://stremit.io/api/v1/images/generate', headers={'Authorization': 'Bearer stremit-sk-your-key-here'}, json={ 'prompt': 'A cozy coffee shop at sunset, watercolor style', 'size': '1536x1024', }, timeout=120, ) with open('image.png', 'wb') as f: f.write(base64.b64decode(res.json()['image_b64']))
# Python — text to speech import requests, base64 res = requests.post( 'https://stremit.io/api/v1/audio/speech', headers={'Authorization': 'Bearer stremit-sk-your-key-here'}, json={ 'text': 'Welcome to Stremit — your AI toolkit.', 'voice': 'nova', 'instructions': 'Speak like an upbeat product narrator.', }, ) with open('speech.mp3', 'wb') as f: f.write(base64.b64decode(res.json()['audio_b64']))
# curl — text to image, decode straight to a file curl -s --max-time 120 https://stremit.io/api/v1/images/generate \ -H "Authorization: Bearer stremit-sk-your-key-here" \ -H "Content-Type: application/json" \ -d '{"prompt": "A minimalist rocket logo, flat design", "size": "1024x1024"}' \ | jq -r '.image_b64' | base64 -d > image.png
// JavaScript — text to speech, played directly in the browser const res = await fetch('https://stremit.io/api/v1/audio/speech', { method: 'POST', headers: { 'Authorization': 'Bearer stremit-sk-your-key-here', 'Content-Type': 'application/json', }, body: JSON.stringify({ text: 'Your order has shipped and arrives tomorrow.', voice: 'sage', format: 'mp3', }), }); const { audio_b64, media_type } = await res.json(); // Turn the base64 into a playable Audio object const bytes = Uint8Array.from(atob(audio_b64), c => c.charCodeAt(0)); const url = URL.createObjectURL(new Blob([bytes], { type: media_type })); new Audio(url).play();
If your token balance runs out you'll get a 402
with an explanation — top up or wait for your monthly reset.
Requests are capped at max_tokens: 4000 and 30 req/min.
Note: GPT-5 models use their default temperature — a custom temperature value is ignored for them.
Reference
Limits & error responses
Token budget
Shares your Pro plan's monthly token allowance — see Tokens Used in your API Key tab.
Rate limits
Most endpoints: 60 req/min · /completions, /search/semantic, /vision/*: 30 req/min · POST /strems, /audio/speech: 10 req/min · /images/generate: 5 req/min
Need help or have a question about the API?
Contact support →