ultralytics / hub

Ultralytics HUB tutorials and support
https://hub.ultralytics.com
GNU Affero General Public License v3.0
138 stars 14 forks source link

pro plan api call #874

Open nmouquet opened 1 month ago

nmouquet commented 1 month ago

Search before asking

Question

I recently upgraded to the Pro plan to increase my API call capacity to 1,000 requests per hour. However, I’ve encountered a few issues that I hope you can help resolve:

1.  Unexpected Call Limits: While integrating the API from my computer, I’ve consistently hit a call limit after making fewer than 100 requests. This limit is well below the expected 1,000 requests per hour outlined in the Pro plan.
2.  Account Dashboard Discrepancies: Additionally, when I check my account dashboard under the ‘Manage My Account’ section, it shows no consumption of API calls, suggesting that my calls are not being recorded or tracked correctly.

Could you please confirm that my account has been correctly upgraded to the Pro plan and that all features are active? Furthermore, could you investigate why the API call consumption is not reflecting correctly on my dashboard and why the limit seems incorrectly enforced?

Additional

No response

UltralyticsAssistant commented 1 month ago

👋 Hello @nmouquet, thank you for bringing up this issue related to the ultralytics/hub 🚀! Your feedback is important.

For your Pro plan concerns regarding API call limits and dashboard discrepancies, please refer to the following resources to ensure everything is set up correctly:

If this is a 🐛 bug report, we would appreciate it if you could provide a few screenshots and steps to reproduce the issue. This will be helpful for our team to diagnose and fix the problem. Please refer to our guide on creating a Minimum Reproducible Example.

If there's any additional information you can share about your setup or usage patterns, please include those details as well.

This is an automated response, but rest assured that an Ultralytics engineer will review your issue and assist you soon. Thank you for your patience and understanding! 😊

nmouquet commented 1 month ago

Dear automated response bot, It seems there’s a bit of a mix-up! The links you provided – https://docs.ultralytics.com/hub/api#usage-limits and https://docs.ultralytics.com/hub/account#manage – aren’t currently available. I am glad that you promise the help of human to assist me soon !

pderrenger commented 1 month ago

@nmouquet hello! 😊

Thank you for pointing that out, and I apologize for any inconvenience. Let's address your concerns directly:

  1. API Call Limits: It sounds like there might be an issue with how your account is recognizing the Pro plan limits. Please ensure that your API key is correctly configured and associated with your Pro account. You might want to try regenerating your API key from the dashboard and updating it in your application.

  2. Dashboard Discrepancies: This could be a display issue or a delay in updating the dashboard. Please try logging out and back in to see if the data refreshes. If the issue persists, it might be a bug.

For both issues, please ensure you're using the latest version of the Ultralytics packages. If the problem continues, providing a detailed description and any error messages will help us investigate further.

Feel free to share any additional details here, and we'll do our best to assist you. Thank you for your patience and understanding! 🚀

nmouquet commented 1 month ago

Thanks for the answer. I checked again today (after having login again and generating a new key and still have the same issue. Here is the code I use :

import json import requests

Run inference on an image

url = "https://predict.ultralytics.com" headers = {"x-api-key": "MYAPIKEY"} data = {"model": "https://hub.ultralytics.com/models/7Lhh6a3ApLEKxh9IIHHx", "imgsz": 640, "conf": 0.25, "iou": 0.45} with open("path/to/image.jpg", "rb") as f: response = requests.post(url, headers=headers, data=data, files={"file": f})

Check for successful response

response.raise_for_status()

Print inference results

print(json.dumps(response.json(), indent=2))

sergiuwaxmann commented 1 month ago

@nmouquet First of all, apologies for the inconvenience. We rebuilt our Shared Inference API a few weeks ago and didn't notice this issue. Our team will investigate this further and implement a fix soon. I will keep you updated. Meanwhile, as you are a Pro user, you can use the Dedicated Inference API which shouldn't have this issue: https://docs.ultralytics.com/hub/inference-api#dedicated-inference-api.

nmouquet commented 1 month ago

Thanks, I tried the code provided on your website and still have some error (see image attached, i replaced MYAPI with my key of course)

Capture d’écran 2024-10-11 à 11 42 13
sergiuwaxmann commented 1 month ago

@nmouquet In the Deploy tab on your model's page is it showing you that the Dedicated Inference API endpoint is live? Do you see the "Stop Endpoint" button?

nmouquet commented 1 month ago

yes I see the button; should I end it ?

sergiuwaxmann commented 1 month ago

@nmouquet No. If you see the button, it means that endpoint is live. Can you make a GET request to that endpoint and confirm that you are receiving a response back?

nmouquet commented 1 month ago

no it failed to connect (see image attached)

Capture d’écran 2024-10-11 à 12 19 16
sergiuwaxmann commented 1 month ago

@nmouquet Maybe try stopping the endpoint and starting it again?

glenn-jocher commented 1 month ago

@fcakyon this is interesting. We have broken link checks on internal Assistant actions but not external Ultralytics Actions which are completely enclosed in https://github.com/ultralytics/actions. Would be nice to port some of that over to a public Python package for use in Ultralytics Actions.

glenn-jocher commented 1 month ago

@sergiuwaxmann @nmouquet to test if endpoints are live you can also just paste the URL in a browser. You'll get a short status report if all is good, i.e.

Screenshot 2024-10-11 at 14 43 44
nmouquet commented 1 month ago

I pasted the url in my browser : https://predict-7lhh6a3aplekxh9iihhx-7nza6zqsha-ew.a.run.app and got "Service Unavailable"

pderrenger commented 1 month ago

Hello @nmouquet,

Thank you for checking the endpoint. The "Service Unavailable" message suggests there might be an issue with the deployment. Let's try a couple of steps:

  1. Restart the Endpoint: Go to your model's page, stop the endpoint, and then start it again. This can sometimes resolve connectivity issues.

  2. Check Region Selection: Ensure that the region selected for your endpoint is optimal for your location to minimize latency.

  3. Verify API Key: Double-check that your API key is correctly configured in your requests.

If the issue persists, please ensure you're using the latest version of any relevant packages. If it's still not working, feel free to share any error messages or logs you encounter. We'll do our best to assist you further! 😊

Thank you for your patience and understanding.

KaramRazooq commented 3 weeks ago

Hello @nmouquet,

Thank you for checking the endpoint. The "Service Unavailable" message suggests there might be an issue with the deployment. Let's try a couple of steps:

  1. Restart the Endpoint: Go to your model's page, stop the endpoint, and then start it again. This can sometimes resolve connectivity issues.
  2. Check Region Selection: Ensure that the region selected for your endpoint is optimal for your location to minimize latency.
  3. Verify API Key: Double-check that your API key is correctly configured in your requests.

If the issue persists, please ensure you're using the latest version of any relevant packages. If it's still not working, feel free to share any error messages or logs you encounter. We'll do our best to assist you further! 😊

Thank you for your patience and understanding.

the following did not resolve the issues,

Any updates on this issue? the endpoint keeps saying Server Error and unavailable when pasting into the browser