NAV
shell python

Introduction

Welcome to the Flacked AI Docs.

We help people write better content faster using AI. This documentation is for Canvas API.

Authentication

To check if your API Key is valid or not, use this code:

import requests

headers = {'APIKey': 'randomkey'}
url = "https://www.flackedai.com/api/v1/verifykey"
result = request.post(url,headers=headers)

# With shell, you can just pass the correct header with each request

curl -H "Content-Type: application/json" -X POST \ 
-H "APIKey: randomkey" \
https://www.flackedai.com/api/v1/verifykey

Make sure to replace randomkey with your API key.

Flacked AI uses API keys to allow access to the API. You can request an API key for yourself at here.

Flacked AI expects for the API key to be included in all API requests to the server in a header that looks like the following:

APIKey: randomkey

Endpoints

Summarize Text


import requests
headers = {'APIKey':'randomkey'}
url = 'https://www.flackedai.com/api/v1/summarize'
data = {'size':20,contents=['url1','url2']}
result = requests.post(url,json=data,headers=headers).json()
print(result)


curl -H "Content-Type: application/json" -X POST \
-H "APIKey: randomkey" \
-d "{\"size\": 20, \"contents\":[\"url1\",\"url2\"]}" \
https://www.flackedai.com/api/v1/summarize


The above command returns an array/list structured like this:

{"result":

    ["summary1","summary2"]

}

This endpoint summarizes all the texts/urls.

HTTP Request

POST https://www.flackedai.com/api/v1/summarize

Query Parameters

Parameter Default Description
size 20 The size of summaries that you want.
contents List of URL's that you want to summarize.

Templates

import requests
headers = {'APIKey':'randomkey'}

url = 'https://www.flackedai.com/api/v1/template'

data = [{"template":"Your Template","content":"Input Text"},{"template":"Your Template2","content":"Input Text2"}]

result = requests.post(url,json=data,headers=headers).json()

print(result)


curl -H "Content-Type: application/json" -X POST \
-H "APIKey: randomkey" \
-d "[{\"template\":\"template_name\",\"content\":\"input\"}]" \
https://www.flackedai.com/api/v1/template

The above command returns JSON structured like this:

{"result":

  ["Output1","Output2"] 

}

This endpoint converts your input text according to template. For Example, if you want to generate Instagram Captions based on some information, you use template as "Instagram Caption"

HTTP Request

POST https://www.flackedai.com/api/v1/template

URL Parameters

Template Description
Instagram Caption Generates Instagram Caption for input text.
Facebook Post Generates Facebook post template for input text
Product Description Generates product description for the input text

We are adding more templates every week. If you want a specific template, you can request it here

Errors

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The url requested is hidden for administrators only.
404 Not Found -- The specified url could not be found.
405 Method Not Allowed -- You tried to access a url with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The url requested has been removed from our servers.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.