Grouping API requests
Group API request usage by ID
It is possible to group API requests in order to help with tracking usage across different projects, or end-customers. To do this, simply provide the group-id
header with a unique ID with each request. You will then be able to view and filter usage by each group on the Usage Dashboard @ https://loci.ai
Here is an example with python:
from pprint import pprint
import requests
API_URL = "https://loci-api.com/3d/tag"
ASSET_FILE_PATH = "https://loci-playground-demo.s3.eu-west-2.amazonaws.com/shib.glb"
API_KEY = "" # your API key
GROUP_ID= "project_1"
response = requests.post(API_URL, headers={"x-api-key": API_KEY, "group-id": GROUP_ID}, data={"url": ASSET_FILE_PATH})
pprint(response.json())
Updated about 1 month ago