Skip to main content

Goal

Pick the right SpeckleSharp API for loading model data from Speckle Server and publishing results back.

What you will learn

When to use Receive2/Send2 (recommended for scripts), Send/Receive with transports, or SendPipeline (connectors only).

When to use this

Before reading Operations method signatures — or when you are unsure which send/receive path fits your workflow. For AEC automation scripts, notebooks, and Grasshopper C#: use Receive2/Send2 (Path C) after the one-time bootstrap. No transport factory required. Avoid SendPipeline unless you are building a desktop connector that uploads an entire host-application model.

The paths at a glance

Your goalAPIWhen
Inspect JSON locallySerialize / DeserializeAsyncNo server; debugging object shape
Learn how transports workSend / Receive + ITransportFull send/receive tour, local-only tests
Load or publish model data (recommended)Receive2 / Send2Scripts, notebooks, Grasshopper C#, most AEC automation
Experimental serializerSerializeNewAvoid in production
Publish whole host-app modelSendPipeline + client.IngestionDesktop connectors only
Path naming is misleading: Send2/Receive2 are the newer, recommended server-facing implementation, not a fallback.

Path A: Serialize only

https://mintcdn.com/speckle/VtRPWzmN-ULoLfIv/images/developers/sdks/csharp.svg?fit=max&auto=format&n=VtRPWzmN-ULoLfIv&q=85&s=f2970e3b8bd4a2c7899b46211a42f251Example
string json = operations.Serialize(myData);
Base restored = await operations.DeserializeAsync(json);
Use when you need raw JSON — for example, previewing a Grasshopper graph locally. For server work, use Path C.

Path B: Send / Receive with a transport

The classic path used in the Full send/receive tour:
https://mintcdn.com/speckle/VtRPWzmN-ULoLfIv/images/developers/sdks/csharp.svg?fit=max&auto=format&n=VtRPWzmN-ULoLfIv&q=85&s=f2970e3b8bd4a2c7899b46211a42f251Example
using var transport = provider.GetRequiredService<IServerTransportFactory>().Create(client.Account, project.id);

var (objectId, _) = await operations.Send(myData, transport, useDefaultCache: true);
var received = await operations.Receive(objectId, remoteTransport: transport);
Swap ServerTransport for MemoryTransport or SQLiteTransport for local-only workflows. The simplest path for most AEC automation scripts — direct URL, project id, and token:
https://mintcdn.com/speckle/VtRPWzmN-ULoLfIv/images/developers/sdks/csharp.svg?fit=max&auto=format&n=VtRPWzmN-ULoLfIv&q=85&s=f2970e3b8bd4a2c7899b46211a42f251Example
var root = await operations.Receive2(client.ServerUrl, project.id, objectId, account.token, onProgressAction: null, cancellationToken: default);

var results = await operations.Send2(client.ServerUrl, project.id, account.token, myData, onProgressAction: null, cancellationToken: default);
The streamId parameter name in these signatures refers to the project id.

Path D: SerializeNew

Experimental — avoid for production workflows.

Path E: SendPipeline (connectors only)

Avoid this unless you are building a connector. For uploading large host-application models, connectors use SendPipeline and client.Ingestion:
https://mintcdn.com/speckle/VtRPWzmN-ULoLfIv/images/developers/sdks/csharp.svg?fit=max&auto=format&n=VtRPWzmN-ULoLfIv&q=85&s=f2970e3b8bd4a2c7899b46211a42f251Example
var ingestion = await client.Ingestion.Create(new ModelIngestionCreateInput(model.id, project.id, "Starting ingestion", sourceData));
var pipeline = provider.GetRequiredService<ISendPipelineFactory>()
    .CreateInstance(ingestion, client.Account, new Progress<StreamProgressArgs>(), cancellationToken: default);
await pipeline.Process(myData);
await pipeline.WaitForUpload();
See Publish large models (connectors). Do not call Version.Create on this pathway.

Decision guide

Use Path CReceive2 after Build your first model analysis tool.
Use Path C (Send2/Receive2) — see Automate with scripts.
Use Path BFull send/receive tour.

Next steps

Build your first model analysis tool

Load and analyse with Receive2

Send analysis results back

Publish with Send2

Operations API

Full method signatures
Last modified on July 10, 2026