How to beginner · 3 min read

LangSmith free tier limits

Quick answer
The LangSmith free tier provides limited monthly API calls and data retention to support lightweight AI tracing and observability. It typically includes a cap on tracked requests per month and a retention period for stored traces, enabling developers to evaluate features before upgrading. Check https://langsmith.com/pricing for the latest free tier limits.

PREREQUISITES

  • Python 3.8+
  • pip install langsmith
  • LANGSMITH_API_KEY environment variable set

Setup

Install the langsmith Python package and set your API key as an environment variable to start using LangSmith for AI observability.

bash
pip install langsmith

Step by step

Use the langsmith.Client to initialize and send traces. The free tier limits your monthly API calls and data retention, but you can start tracing immediately.

python
import os
from langsmith import Client

# Initialize client with API key from environment
client = Client(api_key=os.environ["LANGSMITH_API_KEY"])

# Example traceable function
@client.traceable
def generate_response(prompt: str) -> str:
    # Simulate an LLM call
    return f"Response to: {prompt}"

# Run a sample trace
result = generate_response("What is LangSmith free tier?")
print(result)
output
Response to: What is LangSmith free tier?

Common variations

You can use LangSmith tracing with different AI SDKs like OpenAI or Anthropic by setting environment variables and wrapping your LLM calls with the @traceable decorator. Async tracing and custom project names are also supported.

python
import os
from langsmith import Client, traceable
from openai import OpenAI

client = Client(api_key=os.environ["LANGSMITH_API_KEY"])
openai_client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

@traceable()
def ask_openai(prompt: str) -> str:
    response = openai_client.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{"role": "user", "content": prompt}]
    )
    return response.choices[0].message.content

answer = ask_openai("Explain LangSmith free tier limits.")
print(answer)
output
Explain LangSmith free tier limits.

Troubleshooting

  • If you exceed free tier API call limits, you may receive quota errors; consider upgrading your plan.
  • Ensure LANGSMITH_API_KEY is correctly set to avoid authentication failures.
  • Check network connectivity if traces fail to upload.

Key Takeaways

  • LangSmith free tier limits monthly API calls and data retention for lightweight tracing.
  • Use the official langsmith Python SDK with environment API keys for integration.
  • Wrap your AI calls with @traceable to automatically capture traces.
  • Monitor usage to avoid hitting free tier quotas and upgrade if needed.
  • Check official LangSmith pricing page regularly as limits may change.
Verified 2026-04
Verify ↗