QuickStart

All you need to use a Model from Tiyaro is
  1. Find the API endpoint URL for the model from the UI

  2. Generate your API Key for calling the API

  3. Find the input and output parameters of the API from its model type

  4. Call the API from your application

Find the API endpoint URL for the model from the UI

e.g. See below the model card for model ‘cardiffnlp/twitter-roberta-base-sentiment’
_images/modelcard.png

e.g. See below the API endpoint URL for ‘cardiffnlp/twitter-roberta-base-sentiment’
_images/modeltype.png

The URL in this case is https://api.tiyaro.ai/v1/ent/huggingface/1/cardiffnlp/twitter-roberta-base-sentiment

Generate your API Key for calling the API

Go to API Keys page to generate your API key.

Find the input and output parameters of the API from its model type

Each Model API in tiyaro has a Model Type. You can find out the ‘model type’ of the model from the model card.

_images/modeltype.png

As seen above the ‘model type’ is right next to the API url. So the ‘model type’ of ‘cardiffnlp/twitter-roberta-base-sentiment’ is ‘text-classification’.

Once you have the ‘model type’, look at the API reference for this ‘model type’ to find out its input and output parameters. In this example the API signature for ‘cardiffnlp/twitter-roberta-base-sentiment’ which is of model type ‘text-classification’ is <here>.

Call the API from your application

The model Card has ‘snippets’ of code in many languages that you can adapt for use in your app. If you want fully functioning stand alone programs you can look at the Tiyaro code samples repo.

Note

Most APIs usually support multiple different types of input. For instance, computer vision models can take both an URL or a local image as a base64 encoded string. Please refer to the API reference section to find out all the various input formats that are supported by a given API. Refer to the code samples repo to find helper routines to convert your local image or audio files into base64 format.