API Documentation

As part of Knacks target market it Low code/No Code I would strongly suggest better api documentation. I undertstand that its hard to provide examples as everyones app is different but better samples for various object and field types would help.
Also having and option where you can build a request to try out as is common with other API documentation e.g. Formstack

This would assist low coders like me stucture our api request better.

I have not yet got to the API documentation but it would be really good to have some examples. Often I find that APIs are not that hard to connect to but it’s the formatting of a query that is the problem.

For me it would be really nice to have an example of how I could send a prompt from a knack.com field connect to the GPT playground and then have this data returned to another field.

Here’s a prompt: What is Knack? and the answer.

Node.JS

const { Configuration, OpenAIApi } = require("openai");

const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);

const response = await openai.createCompletion({
  model: "text-davinci-003",
  prompt: "What is knack.com?\n\nKnack.com is an online platform that makes it easy to create and manage custom databases. It allows users to create web and mobile apps, collect data, and analyze it. With Knack, users can quickly and easily set up databases, build forms, create powerful visualizations, and generate insightful reports. It's designed to be used by anyone, from small businesses to large enterprises.",
  temperature: 0.7,
  max_tokens: 256,
  top_p: 1,
  frequency_penalty: 0,
  presence_penalty: 0,
});
JSON

{
  "model": "text-davinci-003",
  "prompt": "What is knack.com?\n\nKnack.com is an online platform that makes it easy to create and manage custom databases. It allows users to create web and mobile apps, collect data, and analyze it. With Knack, users can quickly and easily set up databases, build forms, create powerful visualizations, and generate insightful reports. It's designed to be used by anyone, from small businesses to large enterprises.",
  "temperature": 0.7,
  "max_tokens": 256,
  "top_p": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0
}
cURL

curl https://api.openai.com/v1/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
  "model": "text-davinci-003",
  "prompt": "What is knack.com?\n\nKnack.com is an online platform that makes it easy to create and manage custom databases. It allows users to create web and mobile apps, collect data, and analyze it. With Knack, users can quickly and easily set up databases, build forms, create powerful visualizations, and generate insightful reports. It's designed to be used by anyone, from small businesses to large enterprises.",
  "temperature": 0.7,
  "max_tokens": 256,
  "top_p": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0
}'

i just started messing with the API and was surprised with the poor documentation. I thought i was on the wrong page, but nope thats all there is. this really needs to be done much better and in line with industry norms.