Go SDK methods
⚠️
Preview — this feature is being built; the design below is the spec.
Every method of the planned Go SDK, by resource, with the endpoint it calls. Names follow Go conventions; behaviour, parameters and return shapes match the Python and TypeScript references, which have a full example per method.
Conventions
Methods take a context.Context first and a params struct; list methods have …AutoPaging variants returning an iterator. Errors are returned as *syntic.Error with StatusCode, Code and RequestID.
Admin and Compliance methods live on a separate admin client: admin := syntic.NewAdminClient() // SYNTIC_ADMIN_KEY
Install and first request: Go SDK.
Chat completions
| Method | Endpoint | What it does |
|---|---|---|
client.Chat.Completions.Create(ctx, …) | POST /v1/chat/completions | Send a conversation and get the reply. Pass stream=True to get an iterator of chunks instead. |
client.Chat.Completions.Stream(ctx, …) | POST /v1/chat/completions | Stream with a helper that accumulates text, tool calls and usage, and exposes the final message when done. |
client.Chat.Completions.Parse(ctx, …) | POST /v1/chat/completions | Structured output from a Pydantic model (Python) or Zod schema (TypeScript); returns the parsed object on message.parsed. |
client.Chat.Completions.CountTokens(ctx, …) | POST /v1/chat/completions/count_tokens | Count input tokens for a request body without running it. |
Messages
| Method | Endpoint | What it does |
|---|---|---|
client.Messages.Create(ctx, …) | POST /v1/messages | Send content blocks and receive content blocks. |
client.Messages.Stream(ctx, …) | POST /v1/messages | Stream typed events (content_block_delta, message_delta…) with a final-message accumulator. |
client.Messages.CountTokens(ctx, …) | POST /v1/messages/count_tokens | Count tokens for a Messages request. |
Models
| Method | Endpoint | What it does |
|---|---|---|
client.Models.List(ctx, …) | GET /v1/models | List the models your key can use. Auto-paginates when iterated. |
client.Models.Retrieve(ctx, …) | GET /v1/models/{id} | One model’s limits, capabilities and prices. |
Files
| Method | Endpoint | What it does |
|---|---|---|
client.Files.Upload(ctx, …) | POST /v1/files | Upload from a path, bytes or a file object. Multipart encoding is handled for you. |
client.Files.List(ctx, …) | GET /v1/files | List files, newest first, filtered by purpose. |
client.Files.Retrieve(ctx, …) | GET /v1/files/{file_id} | Metadata for one file. |
client.Files.Content(ctx, …) | GET /v1/files/{file_id}/content | Download bytes. .write_to_file(path) streams to disk. |
client.Files.Delete(ctx, …) | DELETE /v1/files/{file_id} | Delete a file. |
Batches
| Method | Endpoint | What it does |
|---|---|---|
client.Batches.Create(ctx, …) | POST /v1/batches | From an uploaded JSONL input_file_id, or up to 1,000 inline requests. |
client.Batches.List(ctx, …) | GET /v1/batches | List batches. |
client.Batches.Retrieve(ctx, …) | GET /v1/batches/{batch_id} | Status and counts. |
client.Batches.Wait(ctx, …) | (helper; polls GET /v1/batches/{batch_id}) | Helper: poll until the batch ends, with back-off. Returns the final batch. |
client.Batches.Results(ctx, …) | GET /v1/batches/{batch_id}/results | Iterate result lines as typed objects, streaming from the server. |
client.Batches.Cancel(ctx, …) | POST /v1/batches/{batch_id}/cancel | Cancel a running batch. |
client.Batches.Delete(ctx, …) | DELETE /v1/batches/{batch_id} | Delete an ended batch and its result files. |
Embeddings
| Method | Endpoint | What it does |
|---|---|---|
client.Embeddings.Create(ctx, …) | POST /v1/embeddings | Embed one string or a list of up to 2,048 strings. |
Webhooks
| Method | Endpoint | What it does |
|---|---|---|
client.Webhooks.Create(ctx, …) | POST /v1/webhooks | Register an endpoint; the result holds the signing secret once. |
client.Webhooks.List(ctx, …) | GET /v1/webhooks | List endpoints. |
client.Webhooks.Update(ctx, …) | PATCH /v1/webhooks/{webhook_id} | Change events, URL or status. |
client.Webhooks.Delete(ctx, …) | DELETE /v1/webhooks/{webhook_id} | Remove an endpoint. |
client.Webhooks.RotateSecret(ctx, …) | POST /v1/webhooks/{webhook_id}/rotate_secret | New signing secret; both are valid during the overlap. |
client.Webhooks.Test(ctx, …) | POST /v1/webhooks/{webhook_id}/test | Send a webhook.test event. |
client.Webhooks.Unwrap(ctx, …) | (local, no request) | Verify the syntic-signature header against the raw body and return the typed event; raises on a bad signature or a stale timestamp. |
Agents
| Method | Endpoint | What it does |
|---|---|---|
client.Agents.Create(ctx, …) | POST /v1/agents | Create a versioned agent definition. |
client.Agents.List(ctx, …) | GET /v1/agents | List agents. |
client.Agents.Retrieve(ctx, …) | GET /v1/agents/{agent_id} | One agent at its latest or a given version. |
client.Agents.Update(ctx, …) | PATCH /v1/agents/{agent_id} | Change the definition; creates a new version. |
client.Agents.Versions.List(ctx, …) | GET /v1/agents/{agent_id}/versions | All versions. |
client.Agents.Archive(ctx, …) | POST /v1/agents/{agent_id}/archive | Stop new sessions from using it. |
Sessions
| Method | Endpoint | What it does |
|---|---|---|
client.Sessions.Create(ctx, …) | POST /v1/sessions | Start a session, optionally with first events. |
client.Sessions.Send(ctx, …) | POST /v1/sessions/{session_id}/events | Send user messages, tool results or approvals. |
client.Sessions.Stream(ctx, …) | GET /v1/sessions/{session_id}/stream | Iterate live events; reconnects with Last-Event-ID automatically. |
client.Sessions.Events.List(ctx, …) | GET /v1/sessions/{session_id}/events | Full history, paginated. |
client.Sessions.Interrupt(ctx, …) | POST /v1/sessions/{session_id}/interrupt | Stop the current turn. |
client.Sessions.Resources.Add(ctx, …) | POST /v1/sessions/{session_id}/resources | Mount a file, repository or memory store. |
client.Sessions.Threads.List(ctx, …) | GET /v1/sessions/{session_id}/threads | Primary and delegate threads with their usage. |
client.Sessions.Archive(ctx, …) | POST /v1/sessions/{session_id}/archive | Close the session. |
Environments, memory and more
| Method | Endpoint | What it does |
|---|---|---|
client.Environments.Create(ctx, …) | POST /v1/environments | Define a sandbox image. |
client.Environments.Rebuild(ctx, …) | POST /v1/environments/{environment_id}/rebuild | Build the image again. |
client.MemoryStores.Memories.Search(ctx, …) | POST /v1/memory_stores/{store_id}/memories/search | Semantic search within a scope. |
client.MemoryStores.Consolidations.Create(ctx, …) | POST /v1/memory_stores/{store_id}/consolidations | Start a consolidation job. |
client.Vaults.Secrets.Set(ctx, …) | PUT /v1/vaults/{vault_id}/secrets/{name} | Write a secret (write-only). |
client.Deployments.Runs.List(ctx, …) | GET /v1/deployments/{deployment_id}/runs | Recent runs of a deployment. |
client.Skills.Versions.Create(ctx, …) | POST /v1/skills/{skill_id}/versions | Upload a new skill version from a directory; the SDK zips it. |
client.UserProfiles.Create(ctx, …) | POST /v1/user_profiles | Create an end-user profile. |
client.Tunnels.Create(ctx, …) | POST /v1/tunnels | Create an MCP tunnel. |
Evaluations and prompts
| Method | Endpoint | What it does |
|---|---|---|
client.Evals.Datasets.Create(ctx, …) | POST /v1/evals/datasets | Create a dataset. |
client.Evals.Datasets.Items.Add(ctx, …) | POST /v1/evals/datasets/{dataset_id}/items | Add up to 1,000 items. |
client.Evals.Graders.Create(ctx, …) | POST /v1/evals/graders | Define a grader. |
client.Evals.Runs.Create(ctx, …) | POST /v1/evals/runs | Start a run with up to four variants. |
client.Evals.Runs.Wait(ctx, …) | (helper; polls GET /v1/evals/runs/{eval_run_id}) | Helper: wait for a run to finish. |
client.Evals.Runs.Results(ctx, …) | GET /v1/evals/runs/{eval_run_id}/results | Iterate graded results. |
client.Prompts.Improve(ctx, …) | POST /v1/prompts/improve | Rewrite a prompt against feedback. |
client.Prompts.Templates.SetLabel(ctx, …) | PUT /v1/prompts/templates/{template}/labels/{label} | Promote a version. |
Admin API
| Method | Endpoint | What it does |
|---|---|---|
admin.Organization.Retrieve(ctx, …) | GET /v1/organizations/me | Organization info and real plan name. |
admin.Workspaces.Create(ctx, …) | POST /v1/organizations/workspaces | Create a workspace. |
admin.Members.List(ctx, …) | GET /v1/organizations/users | List members; auto-paginates. |
admin.Invites.Create(ctx, …) | POST /v1/organizations/invites | Invite by email. |
admin.ApiKeys.Update(ctx, …) | PATCH /v1/organizations/api_keys/{api_key_id} | Rename or disable a key. |
admin.ServiceAccounts.Create(ctx, …) | POST /v1/organizations/service_accounts | Create a service account. |
admin.UsageReport.Messages(ctx, …) | GET /v1/organizations/usage_report/messages | Token usage in buckets, grouped as you choose. |
admin.CostReport.Retrieve(ctx, …) | GET /v1/organizations/cost_report | Spend by day and workspace. |
admin.Analytics.Summary(ctx, …) | GET /v1/organizations/analytics/summary | Headline numbers for a period. |
admin.AuditEvents.List(ctx, …) | GET /v1/organizations/audit_events | Audit feed, cursor-paginated. |
Compliance API
| Method | Endpoint | What it does |
|---|---|---|
admin.Compliance.Activities.List(ctx, …) | GET /v1/compliance/activities | Iterate activity records. |
admin.Compliance.Exports.Create(ctx, …) | POST /v1/compliance/exports | Start a bulk export. |
admin.Compliance.Exports.Download(ctx, …) | GET /v1/compliance/exports/{export_id}/content | Stream an export to disk. |
admin.Compliance.LegalHolds.Create(ctx, …) | POST /v1/compliance/legal_holds | Preserve records for named people. |
Was this page helpful?