FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
Paulineseemann
Paulineseemannopenai_api_project_Pauline
Public
Like
openai_api_project_Pauline
Home
Code
2
README.md
H
main.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Small subset of OpenAI API

![WARNING] Please play nice and fork this val, so you don't kill my quota

Used in various experiments @hbk-bs seminar basics of digital communication

Usage

curl 'https://www.val.town/v/YOUR_USER_NAME/openai_api' \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "messages": [ { "role": "user", "content": "Hello world" } ] }'

or in JS

Create val
const response = await fetch('https://www.val.town/v/YOUR_USER_NAME/openai_api', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ messages: [ { role: 'user', content: 'Hello world' } ] }) }); const data = await response.json();
Code
README.md
H
main.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.