Compatible with popular stacks and SDKs
Jump in and start building
No unique API quirks to learn, JSONmode.com can be implemented with your existing stack as a reliable, more affordable replacement -- or take advantage of more powerful features.
Drop-in Replacement for OpenAI
Keep your existing calls, SDKs, prompts, etc. Simply set a new base path and key.
Loose or strict JSON schemas
Define in-prompt strict schemas or loose/example outputs and get back reliable structured JSON.
Scrape the web via API
Using the same endpoint, simply include URLs to crawl in the prompt!
PDF-to-JSON
Pass in a URL for PDF files in the prompt and specify what you want returned.
Open Source LLMs
There's no proprietary lock-in here, JSONmode.com is powered by Llama 3 and Mixtral.
Cheap and fast
And getting cheaper and faster every day
How does it work?
Get a free API key
1M free tokens a month
Make 2 changes
Simply set a new base URL and api key -- keep everything else the same!
Need something else?
Drop a line if you are looking for more features! Tool calling etc is on the road map. Anything else?
Swap out a couple of lines and start building
JSONmode.com's API is compatible with your existing OpenAI workflows. Keep your prompts the same, just change the api key and base URL.
const { OpenAI } = require("openai");
const openai = new OpenAI({
apiKey: "JSONMODE_API_KEY",
baseURL: "https://jsonmode.com/v1"
});
async function main() {
const completion = await openai.chat.completions.create({
model: "any",
messages: [{
role: "user", content: '[{city, population: int, country}] Data: "city","city_ascii","lat","lng","country","iso2","iso3","admin_name","capital","population","id" "Tokyo","Tokyo","35.6897","139.6922","Japan","JP","JPN","Tōkyō","primary","37732000","1392685764" "Jakarta","Jakarta","-6.1750","106.8275","Indonesia","ID","IDN","Jakarta","primary","33756000","1360771077" "Delhi","Delhi","28.6100","77.2300","India","IN","IND","Delhi","admin","32226000","1356872604" "Guangzhou", "Guangzhou","23.1300","113.2600","China","CN","CHN","Guangdong","admin","26940000","1156237133" "Mumbai","Mumbai","19.0761","72.8775","India","IN","IND","Mahārāshtra","admin","24973000","1356226629" "Manila","Manila","14.5958","120.9772","Philippines","PH","PHL","Manila","primary","24922000","1608618140"'
}]
});
console.log(completion.choices[0].message.content);
}
main();