NAV Navbar
shell

Introduction

Welcome to the SpinBot.ai API! You can use our API to create new Spins or access previous spins. This can be particularly useful when processing a large volume of articles you'd like to publish, or to automate your processes with scripts.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "https://api.spinbot.ai/"
  -H "Authorization: [your-api-key]"

Make sure to replace [your-api-key] with your API key.

SpinBot.ai uses API keys to allow access to the API. You can find your SpinBot.ai API key on your account page.

SpinBot.ai expects the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: [your-api-key]

Spins

Get All Spins

curl "https://api.spinbot.ai/spins"
  -H "Authorization: [your-api-key]"

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "word_count": 128,
    "character_count": 1024,
    "created": "1970-01-01T00:00:00Z"
  },
  {
    "id": 2,
    "word_count": 10,
    "character_count": 100,
    "created": "1970-01-01T00:00:01Z"
  }
]

This endpoint retrieves all spins.

HTTP Request

GET http://api.spinbot.ai/spins

Get a Specific Spin

curl "http://api.spinbot.ai/spins/2"
  -H "Authorization: [your-api-key]"

The above command returns JSON structured like this:

{
  "id": 2,
  "original": "The original content.",
  "transformed": "The transformed content.",
  "word_count": 3,
  "character_count": 21,
  "created": "1970-01-01T00:00:01Z"
}

This endpoint retrieves the detail of a specific spin.

HTTP Request

GET http://api.spinbot.ai/spins/:id

URL Parameters

Parameter Description
id The ID of the spin to retrieve

Create a Spin

curl "http://api.spinbot.ai/spins"
  -H "Authorization: [your-api-key]"
  -X POST
  -D '{"original":"Some original content."}'

The above command returns JSON structured like this:

{
  "id": 3,
  "original": "Some original content.",
  "transformed": "The transformed content.",
  "word_count": 3,
  "character_count": 21,
  "created": "1970-01-01T00:00:02Z"
}

This endpoint creates a new spin, transforming new content and returning the results.

HTTP Request

POST http://api.spinbot.ai/spins

JSON Data

Parameter Description
Original The Original content to process

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
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.