> For the complete documentation index, see [llms.txt](https://docs.graphlit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graphlit.dev/api-guides/use-cases/specifications/specification-update.md).

# Update Specification

## Specification: Update Specification

### User Intent

"I want to update a model specification's configuration"

### Operation

* **SDK Method**: `graphlit.updateSpecification()`
* **GraphQL**: `updateSpecification` mutation
* **Entity Type**: Specification
* **Common Use Cases**: Adjust model parameters, change temperature, update token limits

### TypeScript (Canonical)

```typescript
import { Graphlit } from 'graphlit-client';
import { Types } from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

const specId = 'spec-id-here';

// Update temperature and token limit
await graphlit.updateSpecification({
  id: specId,
  openAI: {
    temperature: 0.2,  // More deterministic
    completionTokenLimit: 2000
  }
});

console.log('Specification updated');
```

## Update specification (snake\_case)

await graphlit.updateSpecification( specification=SpecificationUpdateInput( id=spec\_id, open\_ai=OpenAiModelPropertiesInput( temperature=0.2, completion\_token\_limit=2000 ) ) )

````

**C#**:
```csharp
using Graphlit;

var client = new Graphlit();

var specId = "spec-id-here";

// Update specification (PascalCase)
await graphlit.UpdateSpecification(new SpecificationUpdateInput {
    Id = specId,
    OpenAI = new OpenAIModelPropertiesInput {
        Temperature = 0.2f,
        CompletionTokenLimit = 2000
    }
});
````

### Parameters

#### SpecificationUpdateInput (Required)

* **`id`** (string): Specification ID
* Provider-specific updates:
  * **`openAI`**: Update OpenAI configuration
  * **`anthropic`**: Update Claude configuration
  * **`google`**: Update Gemini configuration

### Response

```typescript
{
  updateSpecification: {
    id: string;
  }
}
```

### Variations

#### 1. Update Temperature

```typescript
await graphlit.updateSpecification({
  id: specId,
  openAI: {
    temperature: 0.1  // More focused
  }
});
```

#### 2. Update Token Limit

```typescript
await graphlit.updateSpecification({
  id: specId,
  openAI: {
    completionTokenLimit: 4000  // Longer responses
  }
});
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.graphlit.dev/api-guides/use-cases/specifications/specification-update.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
