The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs responses API GET, DELETE examples
Ishaan Jaff3d516fee1fb6
diff --git a/docs/my-website/docs/response_api.md b/docs/my-website/docs/response_api.mdindex 532f20bc057..66a09620f66 100644--- a/docs/my-website/docs/response_api.md+++ b/docs/my-website/docs/response_api.md@@ -13,6 +13,7 @@ LiteLLM provides a BETA endpoint in the spec of [OpenAI's `/responses` API](http| Streaming | ✅ | || Fallbacks | ✅ | Works between supported models || Loadbalancing | ✅ | Works between supported models |+| Supported operations | Create a response, Get a response, Delete a response | || Supported LiteLLM Versions | 1.63.8+ | || Supported LLM providers | **All LiteLLM supported providers** | `openai`, `anthropic`, `bedrock`, `vertex_ai`, `gemini`, `azure`, `azure_ai` etc. |@@ -52,6 +53,56 @@ for event in response:print(event)```+#### GET a Response+```python showLineNumbers title="Get Response by ID"+import litellm++# First, create a response+response = litellm.responses(+ model="openai/o1-pro",+ input="Tell me a three sentence bedtime story about a unicorn.",+ max_output_tokens=100+)++# Get the response ID+response_id = response.id++# Retrieve the response by ID+retrieved_response = litellm.get_responses(+ response_id=response_id+)++print(retrieved_response)++# For async usage+# retrieved_response = await litellm.aget_responses(response_id=response_id)+```++#### DELETE a Response+```python showLineNumbers title="Delete Response by ID"+import litellm++# First, create a response+response = litellm.responses(+ model="openai/o1-pro",+ input="Tell me a three sentence bedtime story about a unicorn.",+ max_output_tokens=100+)++# Get the response ID+response_id = response.id++# Delete the response by ID+delete_response = litellm.delete_responses(+ response_id=response_id+)++print(delete_response)++# For async usage+# delete_response = await litellm.adelete_responses(response_id=response_id)+```+</TabItem><TabItem value="anthropic" label="Anthropic">@@ -289,6 +340,56 @@ for event in response:print(event)```+#### GET a Response+```python showLineNumbers title="Get Response by ID with OpenAI SDK"+from openai import OpenAI++# Initialize client with your proxy URL+client = OpenAI(+ base_url="http://localhost:4000", # Your proxy URL+ api_key="your-api-key" # Your proxy API key+)++# First, create a response+response = client.responses.create(+ model="openai/o1-pro",+ input="Tell me a three sentence bedtime story about a unicorn."+)++# Get the response ID+response_id = response.id++# Retrieve the response by ID+retrieved_response = client.responses.retrieve(response_id)++print(retrieved_response)+```++#### DELETE a Response+```python showLineNumbers title="Delete Response by ID with OpenAI SDK"+from openai import OpenAI++# Initialize client with your proxy URL+client = OpenAI(+ base_url="http://localhost:4000", # Your proxy URL+ api_key="your-api-key" # Your proxy API key+)++# First, create a response+response = client.responses.create(+ model="openai/o1-pro",+ input="Tell me a three sentence bedtime story about a unicorn."+)++# Get the response ID+response_id = response.id++# Delete the response by ID+delete_response = client.responses.delete(response_id)++print(delete_response)+```+</TabItem><TabItem value="anthropic" label="Anthropic">diff --git a/docs/my-website/release_notes/v1.67.4-stable/index.md b/docs/my-website/release_notes/v1.67.4-stable/index.mdindex 6c7309d6bbe..a4318be7b22 100644--- a/docs/my-website/release_notes/v1.67.4-stable/index.md+++ b/docs/my-website/release_notes/v1.67.4-stable/index.md@@ -19,6 +19,29 @@ import Image from '@theme/IdealImage';import Tabs from '@theme/Tabs';import TabItem from '@theme/TabItem';+++## Deploy this version++<Tabs>+<TabItem value="docker" label="Docker">++``` showLineNumbers title="docker run litellm"+docker run+-e STORE_MODEL_IN_DB=True+-p 4000:4000+ghcr.io/berriai/litellm:main-v1.67.4-stable+```+</TabItem>++<TabItem value="pip" label="Pip">++``` showLineNumbers title="pip install litellm"+pip install litellm==1.67.4.post1+```+</TabItem>+</Tabs>+## Key Highlights