Code Monkey home page Code Monkey logo

Comments (7)

jubins avatar jubins commented on June 10, 2024 1

Hey @zeiler and @rok-povsic, thank you for providing the api endpoints and examples.
We are looking at ways to present to users, based on their role, what model
options should be available to them. The goal is to allow users to select their
desired app, and subsequently, to select models from the list of all custom
and built-in models in that app.

from clarifai-python.

rok-povsic avatar rok-povsic commented on June 10, 2024

Hi @jubins ,

The easiest value to get is the CUSTOM MODELS one. This is len(self.models.get_all(private_only=True)).

The other values cannot be accessed with the Python client (or via the REST API endpoints using the Clarifai API key). Instead, you need to use the (currently undocumented) REST API part to first login to get the authentication token, and then to access /apps and /billing_usage endpoints.

  1. Login:

POST to https://api.clarifai.com/v2/login

{
    "email": "YOUR_EMAIL",
    "password": "YOUR_PASSWORD"
}

The session token is in the session_token response field.

  1. The /apps endpoint:

Use the session token in the header X-Clarifai-Session-Token, in a GET https://api.clarifai.com/v2/apps request. The INPUTS and CONCEPTS values are in your app's input_count -> processed and active_concept_count fields.

  1. The /billing_usage endpoint:

Send a GET request to https://api.clarifai.com/v2/billing_usage (it requires X-Clarifai-Session-Token as well).

from clarifai-python.

zeiler avatar zeiler commented on June 10, 2024

Hey @jubins I'm curous what you use case for seeing that information is through the API?

We are currently thinking through new authentication in the API and want to make sure your use case is covered.

from clarifai-python.

jubins avatar jubins commented on June 10, 2024

Hi @rok-povsic, just a follow-up question on the /billing_usage endpoint. What are the parameters for start and end dates?

I'm trying to make a request like in below screenshot, where I want to see usage from 2018 onwards

Screenshot from 2019-08-20 12-13-57

from clarifai-python.

rok-povsic avatar rok-povsic commented on June 10, 2024

Hi @jubins, I believe that currently the /billing_usage endpoint takes no input parameters, so it's not possible to get usage from a certain date onward. But let me make sure and I'll follow up.

from clarifai-python.

rok-povsic avatar rok-povsic commented on June 10, 2024

Hi @jubins, that's correct, the /billing_usage endpoint takes no parameters and is currently the only available billing usage endpoint.

from clarifai-python.

jubins avatar jubins commented on June 10, 2024

Hi @rok-povsic, thanks for confirming and all the help on this. I'll close this issue now.

from clarifai-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.