> ## Documentation Index
> Fetch the complete documentation index at: https://novita.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LlamaIndex

> Intégrez facilement Novita AI à LlamaIndex pour créer des applications intelligentes alimentées par les données.

Conçu pour une indexation et une récupération optimales, LlamaIndex excelle dans la fourniture d’une efficacité élevée pour les applications nécessitant un accès aux données précis et rapide. En combinant [Novita AI](https://novita.ai/) avec LlamaIndex, vous bénéficierez d’avantages clés tels qu’une précision supérieure de récupération des données, une évolutivité inégalée et des performances rentables.

Ce guide vous expliquera comment utiliser LlamaIndex avec Novita AI sur la base de l’API OpenAI, afin d’offrir des solutions d’IA plus intelligentes, évolutives et hautement efficaces, qui stimulent l’innovation et apportent des résultats exceptionnels aux développeurs.

## **Comment intégrer l’API Novita AI avec LlamaIndex**

Étape 1 : Visitez la [bibliothèque de modèles](https://novita.ai/llm-api) sur Novita AI et sélectionnez un modèle qui vous intéresse.

<Frame>
  <img src="https://mintcdn.com/novitaai/bnRhXPrVKQGiPndx/images/Step1VisitModelLibraryonNovitaAIandselectamodelofinterest.png?fit=max&auto=format&n=bnRhXPrVKQGiPndx&q=85&s=d3db29afa82f298487c3284f24397510" alt="images/Step1VisitModelLibraryonNovitaAIandselectamodelofinterest.png" width="3841" height="1905" data-path="images/Step1VisitModelLibraryonNovitaAIandselectamodelofinterest.png" />
</Frame>

Étape 2 : Accédez à la page de démonstration du modèle choisi et cliquez sur le bouton `Code` à droite.

<Frame>
  <img src="https://mintcdn.com/novitaai/bnRhXPrVKQGiPndx/images/Step2NavigatetothedemopageofthechosenmodelandclicktheCodebuttonontheright.png?fit=max&auto=format&n=bnRhXPrVKQGiPndx&q=85&s=e5ca58627abad4dd217b7ac3abd598e7" alt="images/Step2NavigatetothedemopageofthechosenmodelandclicktheCodebuttonontheright.png" width="3841" height="1905" data-path="images/Step2NavigatetothedemopageofthechosenmodelandclicktheCodebuttonontheright.png" />
</Frame>

Étape 3 : Copiez le nom du modèle et notez-le.

<Frame>
  <img src="https://mintcdn.com/novitaai/huCNU0PmcVLk7qAw/images/step3-copy-model-name.png?fit=max&auto=format&n=huCNU0PmcVLk7qAw&q=85&s=41c0c4bd42ab8510f95c14e159454239" alt="Copiez le nom du modèle et notez-le" width="3841" height="1905" data-path="images/step3-copy-model-name.png" />
</Frame>

Étape 4 : [Connectez-vous ](https://novita.ai/user/login)à la plateforme Novita.

<Frame>
  <img src="https://mintcdn.com/novitaai/bnRhXPrVKQGiPndx/images/Step4LogintotheNovitaplatform.png?fit=max&auto=format&n=bnRhXPrVKQGiPndx&q=85&s=d274e15bfd1b4c639512ec19a7ddf6ed" alt="images/Step4LogintotheNovitaplatform.png" width="3841" height="1905" data-path="images/Step4LogintotheNovitaplatform.png" />
</Frame>

Étape 5 : Après vous être connecté, accédez à la [page des paramètres](https://novita.ai/settings) de la plateforme.

<Frame>
  <img src="https://mintcdn.com/novitaai/huCNU0PmcVLk7qAw/images/step5-platform-settings-page.png?fit=max&auto=format&n=huCNU0PmcVLk7qAw&q=85&s=15ea1eed07d2667b57334d65a160f8c4" alt="Ouvrez la page des paramètres de la plateforme après vous être connecté" width="3841" height="1905" data-path="images/step5-platform-settings-page.png" />
</Frame>

Étape 6 : Créez une nouvelle [clé API](https://novita.ai/settings/key-management) et copiez-la pour l’authentification du service.

<Frame>
  <img src="https://mintcdn.com/novitaai/bnRhXPrVKQGiPndx/images/Step6CreateanewAPIkeyandcopyitforserviceauthentication.png?fit=max&auto=format&n=bnRhXPrVKQGiPndx&q=85&s=07b03a5c86e922736118a779e34041ff" alt="images/Step6CreateanewAPIkeyandcopyitforserviceauthentication.png" width="2057" height="617" data-path="images/Step6CreateanewAPIkeyandcopyitforserviceauthentication.png" />
</Frame>

Étape 7 : Installez `llama_index` et les bibliothèques Python associées en exécutant :

<Frame>
  <img src="https://mintcdn.com/novitaai/bnRhXPrVKQGiPndx/images/Step7Installllama_indexandrelatedPythonlibrariesbyrunning.png?fit=max&auto=format&n=bnRhXPrVKQGiPndx&q=85&s=fd802a1818ff357dfcede0fe966e61a9" alt="images/Step7Installllama_indexandrelatedPythonlibrariesbyrunning.png" width="2224" height="682" data-path="images/Step7Installllama_indexandrelatedPythonlibrariesbyrunning.png" />
</Frame>

Étape 8 : Écrivez du code Python et définissez le nom du modèle et la clé API comme paramètres dans la classe NovitaAI.

<Frame>
  <img src="https://mintcdn.com/novitaai/bnRhXPrVKQGiPndx/images/Step8WritePythoncodeandsetthemodelnameandAPIkeyasparametersintheNovitaAIclass.png?fit=max&auto=format&n=bnRhXPrVKQGiPndx&q=85&s=dc8c9b21bd91d18469faab2d238fa9ce" alt="images/Step8WritePythoncodeandsetthemodelnameandAPIkeyasparametersintheNovitaAIclass.png" width="1291" height="437" data-path="images/Step8WritePythoncodeandsetthemodelnameandAPIkeyasparametersintheNovitaAIclass.png" />
</Frame>

Étape 9 : Exécutez le code pour obtenir la sortie.

<Frame>
  <img src="https://mintcdn.com/novitaai/bnRhXPrVKQGiPndx/images/Step9Runthecodetogettheoutput.png?fit=max&auto=format&n=bnRhXPrVKQGiPndx&q=85&s=4f3bf4015516d4acfc6c079b8a7f8c65" alt="images/Step9Runthecodetogettheoutput.png" width="2089" height="41" data-path="images/Step9Runthecodetogettheoutput.png" />
</Frame>

Pour plus d’exemples, consultez la documentation : [llama\_index/llama-index-integrations/llms/llama-index-llms-novita at main · run-llama/llama\_index](https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/llms/llama-index-llms-novita).
