Developer Center

Resources to get you started with Algorithmia



The C#/.Net client is still in development. For now, you can use cURL inside your C#/.Net code to call any algorithm:

Required imports

using System;
using System.Collections.Generic;
using System.Net;
using System.IO;

Calling an algorithm via cURL in C#/.Net

// find your API key at
var apiKey = "_YOUR_API_KEY_";

// pick an algorithm from
var algo = "demo/Hello";

// prepare a POST with JSON content
var request = WebRequest.Create("" + algo); 
request.ContentType = "application/json";
request.Method = "POST";
request.Headers.Add("Authorization", apiKey);

using (StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
    // input should be a string (usually serialized JSON)

WebResponse response = request.GetResponse();

String text = null;
using (StreamReader streamReader = new StreamReader(response.GetResponseStream()))
    text = streamReader.ReadToEnd();
    // many algorithms return serialized JSON; don't forget to parse the text

Additional information

See the full cURL Client Guide and API Specification for additional details on calling algorithms and managing data with cURL.