This is an API to help developers use OpenAI with caching.
Proxy mode mirrors the OpenAI chat API and adds caching.
curl -s -X POST --json '{
"model": "gpt-3.5-turbo",
"messages": [ { "role": "system", "content": "who is the leader of Cambodia. just output the name" } ]
}' "https://aiapi.cash/"
Response:
{
"id": "12345",
"object": "chat.completion",
"created": "00000000",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hun Sen"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
Proxy mode is any get request to this api This mode attempts to use the file extension to determine mime type, we generate three versions and try to parse out the valid file format
https://aiapi.cash/node package myexampleproject with express, zod, express-session, typescript.json
https://aiapi.cash/output zod types to parse reddits subreddit api.ts