> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.meshapi.ai/llms.txt.
> For full documentation content, see https://developers.meshapi.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.meshapi.ai/_mcp/server.

# Prompt Templates

> Manage and use prompt templates with the Go SDK.

# Prompt Templates

Templates allow you to skip re-sending system prompts by storing them on the server.

```go
// Create a template
tmpl, _ := client.Templates.Create(ctx, meshapi.CreateTemplateParams{
    Name:   "support-agent",
    System: "You are a helpful agent for {{company}}.",
    Model:  "openai/gpt-4o-mini",
})

// Use it in a completion
resp, _ := client.Chat.Completions.Create(ctx, meshapi.ChatCompletionParams{
    Template:  &tmpl.Name,
    Variables: map[string]string{"company": "Acme Corp"},
    Messages:  []meshapi.ChatMessage{{Role: "user", Content: "Hi!"}},
})
```

## CRUD Operations

```go
// List
list, _ := client.Templates.List(ctx)

// Get
t, _ := client.Templates.Get(ctx, "uuid-or-name")

// Delete
_ = client.Templates.Delete(ctx, t.ID)
```