> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://humanloop.com/docs/v4/guides/upload-historic-data/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/_mcp/server. > Learn how to upload your historic model data to an existing Humanloop project to warm-start your project. The Humanloop Python SDK allows you to upload your historic model data to an existing Humanloop project. This can be used to warm-start your project. The data can be considered for feedback and review alongside your new user generated data. ### Prerequisites * You already have a Prompt — if not, please follow our [Prompt creation](/docs/guides/create-prompt) guide first. #### Install and initialize the SDK First you need to install and initialize the SDK. If you have already done this, skip to the next section. Open up your terminal and follow these steps: 1. Install the Humanloop SDK: ```python pip install humanloop ``` ```typescript npm install humanloop ``` 2. Initialize the SDK with your Humanloop API key (you can get it from the [Organization Settings page](https://app.humanloop.com/account/api-keys)). ```python from humanloop import Humanloop humanloop = Humanloop(api_key="") # Check that the authentication was successful print(humanloop.prompts.list()) ``` ```typescript import { HumanloopClient, Humanloop } from "humanloop"; const humanloop = new HumanloopClient({ apiKey: "YOUR_API_KEY" }); // Check that the authentication was successful console.log(await humanloop.prompts.list()); ``` ## Log historic data Grab your API key from your [Settings page](https://app.humanloop.com/account/api-keys). 1. Set up your code to first load up your historic data and then log this to Humanloop, explicitly passing details of the model config (if available) alongside the inputs and output: ```python from humanloop import Humanloop import openai # Initialize Humanloop with your API key humanloop = Humanloop(api_key="") # NB: Add code here to load your existing model data before logging it to Humanloop # Log the inputs, outputs and model config to your project - this log call can take batches of data. log_response = humanloop.log( project="", inputs={"question": "How should I think about competition for my startup?"}, output=output, config={ "model": "gpt-4", "prompt_template": "Answer the following question like Paul Graham from YCombinator: {{question}}", "temperature": 0.2, }, source="sdk", ) # Use the datapoint IDs to associate feedback received later to this datapoint. data_id = log_response.id ``` 2. The process of capturing feedback then uses the returned `log_id` as before. See our [guide on capturing user feedback](./capture-user-feedback). 3. You can also log immediate feedback alongside the input and outputs: ```python # Log the inputs, outputs and model config to your project. log_response = humanloop.log( project="", inputs={"question": "How should I think about competition for my startup?"}, output=output, config={ "model": "gpt-4", "prompt_template": "Answer the following question like Paul Graham from YCombinator: {{question}}", "temperature": 0.2, }, source="sdk", feedback={"type": "rating", "value": "good"} ) ``` > Uploading historic model inputs and generations to an existing Humanloop project.