# Generating 'Llava Api Keys' is a problem

**URL:** https://meta.discourse.org/t/generating-llava-api-keys-is-a-problem/299769
**Category:** Support
**Tags:** ai
**Created:** [March 18, 2024, 7:36am UTC](https://meta.discourse.org/t/generating-llava-api-keys-is-a-problem/299769 "2024-03-18T07:36:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Bathinda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bathinda/32/135888_2.png) [@Bathinda](https://meta.discourse.org/u/Bathinda)
#### Post date: [March 18, 2024, 7:36am UTC](https://meta.discourse.org/t/generating-llava-api-keys-is-a-problem/299769/1 "2024-03-18T07:36:16Z")

</div>

For generating Ai Image Captioning on our ‘D’ sites, either we can use Open\_AI’s paid plans (you’ve to even keep some advance credit balance in your account to even begin), or Free & Open Llava Ai Api.

But to get some guidance on how to generate Llava Api keys, I’m Googling for past 3 hours, but even after watching many videos, I’ve not been able to get any direction in right direction.

Llava interface/website doesn’t seem to have any option to generate the needed Api keys straightway:

 ![The image shows a web page from Hugging Face, presenting an overview of an AI model named LLaVa, with descriptions of the model's attributes and its academic references. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/7/e/4/7e404e50c815221be7dd9f53523794e45591c336.png)

I think it’d be very precious for users if there was a just ‘a small link’ which could throw inquisitive users in the right direction. Something similar to this:

 ![The image shows a screenshot of a configuration setting labeled "ai google custom search api key," with a blurred out section that likely represents a censored API key, and there is a red hand-drawn circle highlighting the description below, which includes a URL to the Google Custom Search API developers page.](https://global.discourse-cdn.com/meta/original/4X/a/5/a/a5ac1480a3f52841492b9983abbad096f69f0682.png)

Or better, to this:

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/b/5/3b51ce5e81b996164299ebc262f72f06fa705a60.png)

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [March 18, 2024, 10:56am UTC](https://meta.discourse.org/t/generating-llava-api-keys-is-a-problem/299769/2 "2024-03-18T10:56:54Z")

</div>

Is this what you are looking for? [Get your API Token](https://huggingface.co/docs/api-inference/quicktour#get-your-api-token)

---

<div class="post-metadata">

### Author: ![Bathinda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bathinda/32/135888_2.png) [@Bathinda](https://meta.discourse.org/u/Bathinda)
#### Post date: [March 18, 2024, 1:07pm UTC](https://meta.discourse.org/t/generating-llava-api-keys-is-a-problem/299769/3 "2024-03-18T13:07:54Z")

</div>

Thank you.

But I found that it perhaps only helped me move one step forward. Because whereas for Google Gemini as soon as I filled that key in my D-Site settings, everything depending on Gemini started working perfectly well.

But even after filling this Hugging Face Api secret key (you guided me to) in the Disco-Settings, Image Captioning give ‘Error 500’ (the same image captioning works ok if I choose ‘Open-Ai Gpt4-Vision Preview’ as the Image Captioning Model.

And also, because Llava seems to be different as there are so many empty fields in D-Site Settings named Hugging Face or Llava (why do they use Llava in one place and Hugging Face at other is also adding to the confusion), that I’m sure won’t be redundant.

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/1/c/71ce1bb2839143840a555fc05f68860ae3172414.png)

So, can you point me towards some resource on the internet, which could help me getting the values for all these empty fields in D-Site-Settings, or in implementing this properly.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [March 18, 2024, 2:55pm UTC](https://meta.discourse.org/t/generating-llava-api-keys-is-a-problem/299769/4 "2024-03-18T14:55:46Z")

</div>

I think there is some configuration information here:

> [@Self-Hosting an OpenSource LLM for DiscourseAI](https://meta.discourse.org/t/self-hosting-an-opensource-llm-for-discourseai/290923):
>
> The [Discourse AI](https://meta.discourse.org/t/discourse-ai/259214) plugin has many features that require an LLM to be enabled, like, for example, Summarization, AI Helper, AI Search, AI Bot. While you can use a third party API, like [Configure API Keys for OpenAI](https://meta.discourse.org/t/configure-api-keys-for-openai/280783) or [Configure API Keys for Anthropic](https://meta.discourse.org/t/configure-api-keys-for-anthropic/280936) we built Discourse AI since first day to not be locked into those. Running with HuggingFace TGI HuggingFace provides an awesome container image that can get you running quickly. For example: mkdir -p /opt/tgi-cache docker run --rm --gpus all --shm…

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 18, 2024, 3:39pm UTC](https://meta.discourse.org/t/generating-llava-api-keys-is-a-problem/299769/5 "2024-03-18T15:39:17Z")

</div>

For LLaVa, we only support self-hosting via the `ghcr.io/xfalcox/llava:latest` container image at the moment.

If you do have access to a server with GPU with at least 24GB VRAM, you can self-host it, otherwise I recommend sticking to GPT-4V.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 17, 2024, 3:40pm UTC](https://meta.discourse.org/t/generating-llava-api-keys-is-a-problem/299769/6 "2024-04-17T15:40:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
