---
title: "Together AI Integration"
sidebar:
  label: "Together AI"
seo:
  title: "Together AI Integration with Judgment | Model Provider Docs"
  description: "Use Judgment with Together AI to capture model calls, trace agent behavior, and evaluate production AI systems."
---

{/* @test-flow
  id: provider-together
  lang: python
  env: JUDGMENT_API_KEY, JUDGMENT_ORG_ID
  skip: Requires TOGETHER_API_KEY which is not available in CI
*/}

If you use Together AI models within your application, you can trace, monitor, and analyze them with **Judgment**. You can do this by either

1. **Judgeval Wrap**: Add our [wrap()](/sdk-reference/python/trace/tracer#wrap) around the initialization of your client
2. **OpenTelemetry**: Use the [TogetherAiInstrumentor](https://pypi.org/project/opentelemetry-instrumentation-together/) library to wrap TogetherAI SDK calls and send Otel spans to Judgment.

1. ### Judgeval Wrap

    ```python
    from together import Together
    from judgeval import Tracer, wrap

    Tracer.init(project_name="together_ai_project")

    together_client = Together()
    wrapped_client = wrap(together_client)  # Use wrapped_client from here on
    ```

2. ### OpenTelemetry

    ```python
    from judgeval import Tracer
    # Make sure you installed the dependency: opentelemetry-instrumentation-together
    from opentelemetry.instrumentation.together import TogetherInstrumentor

    Tracer.init(project_name="together_ai_project")
    Tracer.registerOTELInstrumentation(TogetherInstrumentor())
    ```

> **Info**
>
> Together AI uses an OpenAI-compatible API, so you can also use the OpenAI SDK
> with Together AI's base URL and trace it using the [OpenAI
> integration](/documentation/integrations/model-providers/openai).

> **Info**
>
> {" "}
> Only use one of these options to trace Together AI calls or you may see
> duplicate tracing.{" "}
