---
title: "Completions Create"
method: POST
path: "/completions/create"
tags: ["Completions"]
---

# Completions Create

`POST /completions/create`

## Request

- Base URL: `https://trace.wandb.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://trace.wandb.ai/completions/create`
- Auth: none declared

## Request body

- CompletionsCreateReq
  - `project_id` string, required
  - `inputs` CompletionsCreateRequestInputs, required
    - `model` string, required
    - `messages` unknown[]
      - unknown
    - `timeout` union
      - number
      - string
    - `temperature` number, nullable
    - `top_p` number, nullable
    - `n` integer, nullable
    - `stop` union
      - string
      - unknown[]
        - unknown
    - `max_completion_tokens` integer, nullable
    - `max_tokens` integer, nullable
    - `modalities` unknown[], nullable
      - unknown
    - `presence_penalty` number, nullable
    - `frequency_penalty` number, nullable
    - `stream` boolean, nullable
    - `logit_bias` object, nullable
    - `user` string, nullable
    - `response_format` union
      - object
      - unknown
    - `seed` integer, nullable
    - `tools` unknown[], nullable
      - unknown
    - `tool_choice` union
      - string
      - object
    - `logprobs` boolean, nullable
    - `top_logprobs` integer, nullable
    - `parallel_tool_calls` boolean, nullable
    - `reasoning_effort` string, nullable
    - `extra_headers` object, nullable
    - `functions` unknown[], nullable
      - unknown
    - `function_call` string, nullable
    - `api_version` string, nullable
    - `prompt` string, nullable: Reference to a Weave Prompt object (e.g., 'weave:///entity/project/object/prompt_name:version'). If provided, the messages from this prompt will be prepended to the messages in this request. Template variables in the prompt messages can be substituted using the template_vars parameter.
    - `template_vars` object, nullable: Dictionary of template variables to substitute in prompt messages. Variables in messages like '{variable_name}' will be replaced with the corresponding values. Applied to both prompt messages (if prompt is provided) and regular messages.
    - `vertex_credentials` string, nullable: JSON string of Vertex AI service account credentials. When provided for vertex_ai models (e.g. vertex_ai/gemini-2.5-pro), used for authentication instead of api_key. Not persisted in trace storage.
  - `inference_route` DedicatedInferenceRoute: Server-side routing information for a dedicated inference deployment.
    - `connection_type` 'dedicated', required
    - `connection` string, required
    - `base_url` string, required
  - `wb_user_id` string, nullable: Do not set directly. Server will automatically populate this field.
  - `track_llm_call` boolean, nullable: Whether to track this LLM call in the trace server
  - `trace_id` string, nullable: Trace ID to use for the LLM call (for nesting under a parent)
  - `parent_id` string, nullable: Parent call ID to nest this LLM call under
  - `conversation_id` string, nullable: Conversation ID to group related completions into a multi-turn conversation
  - `conversation_name` string, nullable: Human-readable conversation name
  - `source` string, nullable: Source of the completion request (e.g. 'playground', 'signals')

## Response `200`

Successful Response

- CompletionsCreateRes
  - `response` object, required
  - `weave_call_id` string, nullable
  - `span_id` string, nullable
  - `trace_id` string, nullable
  - `conversation_id` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `dd89fadfe4e4`: 1 info
  - endpoint added
- **2026-01-07** `d6e39f7c717d`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/wandb/apis/fastapi/changes/completions/create/post.md)

---

[API](https://skmtc.dev/wandb/apis/fastapi.md) - [All operations](https://skmtc.dev/wandb/apis/fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/wandb/apis/fastapi/revisions/f7643c49bf2e?raw)
