API Management

My APIs

Create an API

→ Adding Basics

Click the “APIs” tab in the left-hand side dashboard to get started, next, choose “My APIs” where you can create and manage your own API. On clicking the “Publish new API" button, you will see six sections needing to be filled up: APIs Name, Category, Description, READ ME (instruction file), Health Check and Emergency Contact. It's optional to add terms of use.

→ Configuring Details

After turning them in with the “Next > Configure details" button, go into detail by different options in the menu bar above. In the “General info” part, users can edit the basic information or add in more in the “Optional fields” section such as README, Term Of Use or Health Check. Click “Save" to finish the task.

→ Configuring Endpoints

In the “Configure endpoints” tab, there are three stages: Base URL, Access Control and Endpoint list.

All API endpoints are relative to a base URL. To set up a Base URL for your API, hit the “Add base URL" button, type or paste it in the “placeholder” bar. The number of your base URL is unlimited. Save the process once you have finished these steps.

In the “Access Control” stage, AI Marketplace allows you to add secret headers and query string parameters to API requests. In the Secret Headers and Parameters segment, you can add one or more name-value pairs, then determine Header or Parameter in the Type section. Add an optional description to allow other API owners to know the function of the query string.

The following stage in the process is to begin characterizing your API endpoints. This is the manner by which engineers will understand what endpoints they get access to as well as every one of the boundaries they can utilize.

This page is where you can characterize the entirety the accompanying unfulness:

  • Name: You can provide a descriptive name for the endpoint or just set the name to match the route. This will be the name visualized in the quick right-hand menu of the Documentation.

  • Description: This helps developers understand the function of endpoints.

  • Instruction link : Endpoint documentations

  • Method: Defines the HTTP method that will be used to call your endpoint. We support GET, POST, PUT, DELETE, and PATCH.

  • Path: The route to the endpoint, remember this path does not include your Base URL. In some cases, you might want to allow the user to specify a parameter in the Route, therefore, you can use curly braces to encapsulate the user-defined parameter.

Request Header

You can specify custom headers to be passed to your API endpoint by the user. To add a header, navigate to the Header tab on the Add Endpoint screen. You can provide following information for query string parameters:

  • Name: A name is obligatory for your query parameter.

  • Type: Choose from ARRAY, BOOLEAN, DATE, ENUM, NUMBER, OBJECT, STRING and TIME.

  • Example Value: A value can be pre-filled into the form parameter to be displayed on the AI Marketplace when the user tests the endpoint.

  • Required: Check this box to make the query string parameter required.

Query String Parameters

Adding a Query String Parameter is to give additional parameters to a request. For example, a filter could be an additional parameter query string parameter passed with the request. To add a query parameter, navigate to the Query tab on the Add Endpoint screen. you can provide the following information for query string parameters:

  • Name: A name is obligatory for your query parameter.

  • Type: Choose from ARRAY, BOOLEAN, DATE, ENUM, NUMBER, OBJECT, STRING and TIME.

  • Example Value: A value can be pre-filled into the form parameter to be displayed on the AI Marketplace when the user tests the endpoint.

  • Required: Check this box to make a query string parameter required.

Body Parameters

When you specify the method to query the endpoint as a POST, PUT, DELETE or PATCH method, you can also define a payload for the request. You can add it as a form parameter or as a model.

With Media type form-data

Selecting form-data as the media type:

  • Name: A name is compulsory for your form parameter.

  • Type: Choose from String, Enum, Number, etc.

  • Example Value: A value can be pre-filler into the form parameter to be displayed on the AI Marketplace when the user uses the endpoint.

  • Required: Check this box to make the form parameter required.

With Media type octet-stream

Selecting octet-stream as the media type:

  • Required: Check this box to make the form parameter required.

With Media type other

With the media type selector, you can define a payload in multiple formats. This gives consumers the flexibility to post data to your endpoint from an option you make available. You can specify many parameters and create nested objects depending on the media type.

  • Media Type: Choose from available types: application/ json, application/xml, application/ plain.1

  • Name: A name is obligatory for your form parameter.

  • Description: Describe the parameter in a few words.

  • Example: Fill out an example with a description of what the model looks like. For example, for a JSON model it might be:

Response

Response allows you to add API related response code examples.

Click the “Add New Response Code" and fill Response Code, click “Add Response Code” to create .

→ Package and pricing

Creators have the full freedom to decide their API pricing but remember that all APIs on AI Marketplace fall into “Pay per request” type. You can create a new package by clicking “Add”. A table will prompt into the middle of your screen. Please input the number of requests (more than 10 and divisible by 5, the price per request and the validity period. As soon as you click the pink “Add" button, the “Added package successfully” notification appears. Now, you will be directed to this screen, where you check and change the status of the packages.

Put a tick in the checkbox of the feature, then click the “Sell" or “Withdraw" button right above the table to switch the status from “idle" into “on sale" and vice versa. Please notice that you can not modify an existing pricing plan, you can just remove it by ticking the checkbox then clicking the red “Delete" text.

→ Configure sale and ownership

Through those previous steps, your API project is still invisible to everyone on the platform to buy and use. Select the “Configure sale and ownership" tab to go to the final step to release your product on the Marketplace. After reading the “Term of service" thoroughly, tick the checkbox to confirm that you are the owner and then switch “List On Marketplace" to public the created API.

In case you want to transfer the ownership of this project to another user on this platform, look up their account in the “Search User" bar and choose your desired name from the dropdown list. Now, the “Transfer Ownership" button will light up. Once you click it, you'll no longer have control of the project.

The “Delete API Project" section permits you to permanently delete the API project in the whole DINO system. On selecting the red “Delete API Project" button, you receive a confirmation request. Next, enter the project's name and click “Delete Project".

Bought APIs

In this tab, you can buy and arrange all the bought APIs.

Claim earnings

Service: service name

Package: package name

Customer: account ID

Success: how much of the quota your customers have used

Claimable: amount of claimable tokens

Please notice that you can only collect ORAI when the number of used quotas are divisible by 5. Next, a box will appear to help you double check information before claiming ORAI.

Last updated