SDKs & client libraries

There's no official SDK yet. The API is small enough that a working wrapper is about 50 lines in any language, and the snippets below can be copied straight into your project.

curl

{"# Every REST call\ncurl -sS -H \"Authorization: Bearer $API_KEY\" \\\n  https://api.cookin.fun/v1/tokens/new"}

Node.js (fetch)

{"const API_KEY = process.env.API_KEY;\n\nasync function fetchApi(path) {\n  const res = await fetch(`https://api.cookin.fun${path}`, {\n    headers: { \"Authorization\": `Bearer ${API_KEY}` },\n  });\n  if (!res.ok) throw new Error(`API ${res.status}: ${await res.text()}`);\n  return res.json();\n}\n\nconst { data } = await fetchApi(\"/v1/tokens/new\");\nconsole.log(data);"}

Python (requests)

{"import os, requests\n\nAPI_KEY = os.environ[\"API_KEY\"]\nSESSION = requests.Session()\nSESSION.headers.update({\"Authorization\": f\"Bearer {API_KEY}\"})\n\ndef fetch_api(path):\n    r = SESSION.get(f\"https://api.cookin.fun{path}\")\n    r.raise_for_status()\n    return r.json()\n\nresponse = fetch_api(\"/v1/tokens/new\")\nprint(response[\"data\"])"}

WebSocket

See the terminal / Node.js / Python examples on the tokens:live and frames:live pages.

Community wrappers

Building a wrapper? Ping us — we'll link it here.

Bug or unclear docs? Include the request_id from the response envelope when reporting.

Ready to build? Mint an API key.