C# SDK methods

⚠️
Preview — this feature is being built; the design below is the spec.

Every method of the planned C# SDK, by resource, with the endpoint it calls. Names follow C# conventions; behaviour, parameters and return shapes match the Python and TypeScript references, which have a full example per method.

Conventions

All network methods are async and end in Async; list methods have ListAutoPagingAsync returning IAsyncEnumerable<T>. Streaming returns an IAsyncDisposable stream.

Admin and Compliance methods live on a separate admin client: var admin = new SynticAdminClient(); // SYNTIC_ADMIN_KEY

Install and first request: C# SDK.

Chat completions

MethodEndpointWhat it does
client.Chat.Completions.CreateAsync(…)POST /v1/chat/completionsSend a conversation and get the reply. Pass stream=True to get an iterator of chunks instead.
client.Chat.Completions.Stream(…)POST /v1/chat/completionsStream with a helper that accumulates text, tool calls and usage, and exposes the final message when done.
client.Chat.Completions.ParseAsync(…)POST /v1/chat/completionsStructured output from a Pydantic model (Python) or Zod schema (TypeScript); returns the parsed object on message.parsed.
client.Chat.Completions.CountTokensAsync(…)POST /v1/chat/completions/count_tokensCount input tokens for a request body without running it.

Messages

MethodEndpointWhat it does
client.Messages.CreateAsync(…)POST /v1/messagesSend content blocks and receive content blocks.
client.Messages.Stream(…)POST /v1/messagesStream typed events (content_block_delta, message_delta…) with a final-message accumulator.
client.Messages.CountTokensAsync(…)POST /v1/messages/count_tokensCount tokens for a Messages request.

Models

MethodEndpointWhat it does
client.Models.ListAsync(…)GET /v1/modelsList the models your key can use. Auto-paginates when iterated.
client.Models.RetrieveAsync(…)GET /v1/models/{id}One model’s limits, capabilities and prices.

Files

MethodEndpointWhat it does
client.Files.UploadAsync(…)POST /v1/filesUpload from a path, bytes or a file object. Multipart encoding is handled for you.
client.Files.ListAsync(…)GET /v1/filesList files, newest first, filtered by purpose.
client.Files.RetrieveAsync(…)GET /v1/files/{file_id}Metadata for one file.
client.Files.ContentAsync(…)GET /v1/files/{file_id}/contentDownload bytes. .write_to_file(path) streams to disk.
client.Files.DeleteAsync(…)DELETE /v1/files/{file_id}Delete a file.

Batches

MethodEndpointWhat it does
client.Batches.CreateAsync(…)POST /v1/batchesFrom an uploaded JSONL input_file_id, or up to 1,000 inline requests.
client.Batches.ListAsync(…)GET /v1/batchesList batches.
client.Batches.RetrieveAsync(…)GET /v1/batches/{batch_id}Status and counts.
client.Batches.WaitAsync(…)(helper; polls GET /v1/batches/{batch_id})Helper: poll until the batch ends, with back-off. Returns the final batch.
client.Batches.ResultsAsync(…)GET /v1/batches/{batch_id}/resultsIterate result lines as typed objects, streaming from the server.
client.Batches.CancelAsync(…)POST /v1/batches/{batch_id}/cancelCancel a running batch.
client.Batches.DeleteAsync(…)DELETE /v1/batches/{batch_id}Delete an ended batch and its result files.

Embeddings

MethodEndpointWhat it does
client.Embeddings.CreateAsync(…)POST /v1/embeddingsEmbed one string or a list of up to 2,048 strings.

Webhooks

MethodEndpointWhat it does
client.Webhooks.CreateAsync(…)POST /v1/webhooksRegister an endpoint; the result holds the signing secret once.
client.Webhooks.ListAsync(…)GET /v1/webhooksList endpoints.
client.Webhooks.UpdateAsync(…)PATCH /v1/webhooks/{webhook_id}Change events, URL or status.
client.Webhooks.DeleteAsync(…)DELETE /v1/webhooks/{webhook_id}Remove an endpoint.
client.Webhooks.RotateSecretAsync(…)POST /v1/webhooks/{webhook_id}/rotate_secretNew signing secret; both are valid during the overlap.
client.Webhooks.TestAsync(…)POST /v1/webhooks/{webhook_id}/testSend a webhook.test event.
client.Webhooks.UnwrapAsync(…)(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

MethodEndpointWhat it does
client.Agents.CreateAsync(…)POST /v1/agentsCreate a versioned agent definition.
client.Agents.ListAsync(…)GET /v1/agentsList agents.
client.Agents.RetrieveAsync(…)GET /v1/agents/{agent_id}One agent at its latest or a given version.
client.Agents.UpdateAsync(…)PATCH /v1/agents/{agent_id}Change the definition; creates a new version.
client.Agents.Versions.ListAsync(…)GET /v1/agents/{agent_id}/versionsAll versions.
client.Agents.ArchiveAsync(…)POST /v1/agents/{agent_id}/archiveStop new sessions from using it.

Sessions

MethodEndpointWhat it does
client.Sessions.CreateAsync(…)POST /v1/sessionsStart a session, optionally with first events.
client.Sessions.SendAsync(…)POST /v1/sessions/{session_id}/eventsSend user messages, tool results or approvals.
client.Sessions.Stream(…)GET /v1/sessions/{session_id}/streamIterate live events; reconnects with Last-Event-ID automatically.
client.Sessions.Events.ListAsync(…)GET /v1/sessions/{session_id}/eventsFull history, paginated.
client.Sessions.InterruptAsync(…)POST /v1/sessions/{session_id}/interruptStop the current turn.
client.Sessions.Resources.AddAsync(…)POST /v1/sessions/{session_id}/resourcesMount a file, repository or memory store.
client.Sessions.Threads.ListAsync(…)GET /v1/sessions/{session_id}/threadsPrimary and delegate threads with their usage.
client.Sessions.ArchiveAsync(…)POST /v1/sessions/{session_id}/archiveClose the session.

Environments, memory and more

MethodEndpointWhat it does
client.Environments.CreateAsync(…)POST /v1/environmentsDefine a sandbox image.
client.Environments.RebuildAsync(…)POST /v1/environments/{environment_id}/rebuildBuild the image again.
client.MemoryStores.Memories.SearchAsync(…)POST /v1/memory_stores/{store_id}/memories/searchSemantic search within a scope.
client.MemoryStores.Consolidations.CreateAsync(…)POST /v1/memory_stores/{store_id}/consolidationsStart a consolidation job.
client.Vaults.Secrets.SetAsync(…)PUT /v1/vaults/{vault_id}/secrets/{name}Write a secret (write-only).
client.Deployments.Runs.ListAsync(…)GET /v1/deployments/{deployment_id}/runsRecent runs of a deployment.
client.Skills.Versions.CreateAsync(…)POST /v1/skills/{skill_id}/versionsUpload a new skill version from a directory; the SDK zips it.
client.UserProfiles.CreateAsync(…)POST /v1/user_profilesCreate an end-user profile.
client.Tunnels.CreateAsync(…)POST /v1/tunnelsCreate an MCP tunnel.

Evaluations and prompts

MethodEndpointWhat it does
client.Evals.Datasets.CreateAsync(…)POST /v1/evals/datasetsCreate a dataset.
client.Evals.Datasets.Items.AddAsync(…)POST /v1/evals/datasets/{dataset_id}/itemsAdd up to 1,000 items.
client.Evals.Graders.CreateAsync(…)POST /v1/evals/gradersDefine a grader.
client.Evals.Runs.CreateAsync(…)POST /v1/evals/runsStart a run with up to four variants.
client.Evals.Runs.WaitAsync(…)(helper; polls GET /v1/evals/runs/{eval_run_id})Helper: wait for a run to finish.
client.Evals.Runs.ResultsAsync(…)GET /v1/evals/runs/{eval_run_id}/resultsIterate graded results.
client.Prompts.ImproveAsync(…)POST /v1/prompts/improveRewrite a prompt against feedback.
client.Prompts.Templates.SetLabelAsync(…)PUT /v1/prompts/templates/{template}/labels/{label}Promote a version.

Admin API

MethodEndpointWhat it does
admin.Organization.RetrieveAsync(…)GET /v1/organizations/meOrganization info and real plan name.
admin.Workspaces.CreateAsync(…)POST /v1/organizations/workspacesCreate a workspace.
admin.Members.ListAsync(…)GET /v1/organizations/usersList members; auto-paginates.
admin.Invites.CreateAsync(…)POST /v1/organizations/invitesInvite by email.
admin.ApiKeys.UpdateAsync(…)PATCH /v1/organizations/api_keys/{api_key_id}Rename or disable a key.
admin.ServiceAccounts.CreateAsync(…)POST /v1/organizations/service_accountsCreate a service account.
admin.UsageReport.MessagesAsync(…)GET /v1/organizations/usage_report/messagesToken usage in buckets, grouped as you choose.
admin.CostReport.RetrieveAsync(…)GET /v1/organizations/cost_reportSpend by day and workspace.
admin.Analytics.SummaryAsync(…)GET /v1/organizations/analytics/summaryHeadline numbers for a period.
admin.AuditEvents.ListAsync(…)GET /v1/organizations/audit_eventsAudit feed, cursor-paginated.

Compliance API

MethodEndpointWhat it does
admin.Compliance.Activities.ListAsync(…)GET /v1/compliance/activitiesIterate activity records.
admin.Compliance.Exports.CreateAsync(…)POST /v1/compliance/exportsStart a bulk export.
admin.Compliance.Exports.DownloadAsync(…)GET /v1/compliance/exports/{export_id}/contentStream an export to disk.
admin.Compliance.LegalHolds.CreateAsync(…)POST /v1/compliance/legal_holdsPreserve records for named people.
Was this page helpful?