Banana

Carrot

This API runs carrot, the state-of-the-art vision-language model.
It can perform image captioning, image QA and image-text similarity calculation.

Add this to your node.js code:

const banana = require('@banana-dev/banana-dev');

var apiKey = "{YOUR API KEY}"
var modelKey = "carrot"

const modelParameters = {
                    "text":"is this a banana?", #text for QA / Similarity
                    "imageURL":"https://demo-images-banana.s3.us-west-1.amazonaws.com/image1.jpg", #image for the model
                    "similarity":False #whether to return text-image similarity
                    "maxLength":100, #max length of the generation
                    "minLength":30 #min length of the generation
                    }

let run = async (modelParameters) => {
    var out = await banana.run(apiKey, modelKey, modelParameters)
    console.log(out)
    return out
}

run(modelParameters)

Arguments:

Arg Description Required Type Example
api_key Your API key, found on the User Dashboard True string "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
model_key This models name True string "clip"
model_parameters Dictionary of custom tuning parameters False dict {"text": "banana","imageURL":"https://demo-images-banana.s3.us-west-1.amazonaws.com/image1.jpg"}