# Retrieve a chat completion
URL: https://docs.munito.ai/api/getChatCompletion

GET /chat/completions/{completion_id}

Returns a completion that was created with `store: true` or with `Prefer: respond-async`. A background completion answers 202 until it finishes. Pass ?stream=true to attach to its live stream, and send Last-Event-ID to resume after that event.

```json
{
  "operationId": "getChatCompletion",
  "summary": "Retrieve a chat completion",
  "tags": [
    "Completions"
  ],
  "description": "Returns a completion that was created with `store: true` or with `Prefer: respond-async`. A background completion answers 202 until it finishes. Pass ?stream=true to attach to its live stream, and send Last-Event-ID to resume after that event.",
  "parameters": [
    {
      "name": "completion_id",
      "in": "path",
      "required": true,
      "description": "The completion id, e.g. `chatcmpl-7f3c1a`.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "stream",
      "in": "query",
      "description": "Attach to the live stream of a background completion.",
      "schema": {
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "The chat completion object."
    },
    "202": {
      "description": "The completion is still running. Poll again."
    },
    "404": {
      "description": "No completion with this id is stored in your workspace."
    }
  }
}
```

# Shared API schemas
{
  "securitySchemes": {
    "BearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "description": "Your Munito API key."
    },
    "ApiKeyAuth": {
      "type": "apiKey",
      "in": "header",
      "name": "x-api-key",
      "description": "Your Munito API key."
    }
  }
}