🔌API routes

In this page, learn how to leverage the API routes to implement the User-Generated Emote feature in your game.

Login Routes

The OAuth 2.0 method of authentication consists in generating an authentication token. This can then be used as tokenized temporary credentials. The implicit flow is a browser only flow. It can be used in web applications that need access tokens and cannot make use of a backend. Ask for a client ID if you need to implement this flow.

Authorization endpoint

GET https://auth.kinetix.tech/login

Initiates user authentication and redirects to the pre-registered callback URL with the authentication token in the URL fragment.

Query Parameters

NameTypeDescription

client_id*

String

The ID of the requesting client

response_type*

String

Defines the flow type, here it's implicit flow: token

redirect_uri

String

The redirect_uri the client wants to redirect to

Get information on your subscription plan

POST https://sdk-api.kinetix.tech/v1/plans

Retrieves information about your current subscription plan. You can upgrade your plan at any time on the Kinetix Developer Portal.

Content-Type: application/json

Headers

NameTypeDescription

x-api-key*

GameAPIKey

Content-Type*

String

application/json

[
  {
    "name": "string",
    "mugeLimit": 0,
    "totalUsersLimit": 0,
    "callsLimit": 0,
    "createdAt": "2023-12-19T17:36:35.144Z"
  }
]

Create and manage your AI processes

In this section, learn how to let your players communicate with our AI directly though your game, to create emotes.

You will need to send the token you have created in previous endpoint in your header as x-api-token in order to use next endpoint. This token will only be useable for 5 minutes.

This ML process creates an emote from a video file, please be aware the heavier the file you are sending as input is, the longer this process will take.

We recommend you to send videos where only one character is visible.

Generate token

GET https://sdk-api.kinetix.tech/v1/process/token

Obtain a token to authenticate emote creation processes.

Headers

NameTypeDescription

Content-Type*

String

application/json

x-api-key*

String

VirtualWorldKey

Request Body

NameTypeDescription

userId*

String

Virtual world's user ID

{
  "uuid": "string",
  "url": "string",
  "expire": "2023-06-23T14:26:13.811Z"
}

Create ML process for emote creation from a token

POST https://sdk-api.kinetix.tech/v1/process

Initiates an ML process to generate a user-generated emote from a token.

Headers

NameTypeDescription

Content-Type*

String

application/json

x-api-key*

String

VirtualWorldKey

x-api-token*

String

Token uuid

Request Body

NameTypeDescription

mature*

boolean

If the content is for adults only

start*

example":"00:00:00.000

Start time of video

end*

example":"00:00:02.000

End time of video

name*

String

Name of the emote to create

video*

Video file

Supported : AVI, FLV, MKV, MP4, TS, MOV, WebM

{
  "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "emote": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "animation": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "video": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "step": "string",
  "vw": 0,
  "user": 0,
  "progression": 0,
  "createdAt": "2023-06-23T14:33:53.426Z",
  "ml": {
    "progression": 0,
    "mlRemaining": 0,
    "mlElapsed": 0
  }
}

Get process status

GET https://sdk-api.kinetix.tech/v1/process/{uuid}

Get a user process status. The user must be associated to requesting virtual world

Headers

NameTypeDescription

Content-Type*

String

application/json

x-api-key*

String

VirtualWorldKey

Request Body

NameTypeDescription

uuid*

String

The process uuid returned by the POST /v1/process route.

{
  "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "emote": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "animation": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "video": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "step": "string",
  "vw": 0,
  "user": 0,
  "progression": 0,
  "createdAt": "2023-06-23T14:44:45.132Z",
  "ml": {
    "progression": 0,
    "mlRemaining": 0,
    "mlElapsed": 0
  }
}

Validate the process

POST https://sdk-api.kinetix.tech/v1/process/{uuid}/validate

If you want to let your users the capacity to retake an emote, you have to let them validate or not an emote when it's generated. It means that, after generating an emote, players will have two options: validate the process if they're satisfied with the emote output they received, or retake the process. Note that for now, you cannot benefit from the validate/retake process on your own: you have to ask Ben to activate it for you. When the validation flow is activated, this will make the emote available to the user.

Headers

NameTypeDescription

Content-Type*

String

application/json

x-api-key*

String

VirtualWorldKey

Request Body

NameTypeDescription

uuid*

String

The process uuid returned by the POST /v1/process route.

{
  "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "emote": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "animation": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "video": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "step": "string",
  "vw": 0,
  "user": 0,
  "progression": 0,
  "createdAt": "2023-06-23T14:44:45.132Z",
  "ml": {
    "progression": 0,
    "mlRemaining": 0,
    "mlElapsed": 0
  }
}

Retake the Process

POST https://sdk-api.kinetix.tech/v1/process/{uuid}/retake

When the validation flow is activated, this will reject the process and return a new generation token to let the user retry. If you want to let your users the capacity to retake an emote, you have to let them validate or not an emote when it's generated. It means that, after generating an emote, players will have two options: validate the process if they're satisfied with the emote output they received, or retake the process.

Headers

NameTypeDescription

Content-Type*

String

application/json

x-api-key*

String

VirtualWorldKey

Request Body

NameTypeDescription

uuid*

String

The process uuid returned by the POST /v1/process route.

{
  "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "emote": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "animation": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "video": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "step": "string",
  "vw": 0,
  "user": 0,
  "progression": 0,
  "createdAt": "2023-06-23T14:44:45.132Z",
  "ml": {
    "progression": 0,
    "mlRemaining": 0,
    "mlElapsed": 0
  }
}

Get token status

GET https://sdk-api.kinetix.tech/v1/process/token/{token}

Determines the status of a previously generated token.

Headers

NameTypeDescription

Content-Type*

String

application/json

x-api-key*

String

VirtualWorldKey

token*

String

Token generated

Request Body

NameTypeDescription

userId*

String

Virtual world's user ID

{
  "uuid": "string",
  "url": "string",
  "expire": "2023-06-23T14:26:13.811Z"
}

Create QR code

GET https://sdk-api.kinetix.tech/v1/process/dev-token

Create a QR code for the specified user. By default, it will use the virtual world id 1. Virtual World can be changed by specifying one of its keys.

Headers

NameTypeDescription

Content-Type*

String

application/json

x-api-key*

String

VirtualWorldKey

Request Body

NameTypeDescription

userId*

String

Virtual world's user ID

Virtual world's key

String

image/png

Last updated