Cloud AI Backend for Unity

CraftCore

The AI backend for CraftWorks products. A unified interface to call OpenAI, Anthropic, and Google AI from Unity. Handles keys, models, usage tracking, and streaming. Free and bundled.

Freebundled with DialogueCraft

What it does

CraftCore sits between your Unity project and cloud AI providers.

Provider Management

Switch between OpenAI, Anthropic, Google, or custom endpoints from a single settings panel.

API Key Storage

Keys stored locally in Unity EditorPrefs. Never committed to version control, never sent anywhere except the provider.

Model Registry

Browse available models per provider. Select defaults or let each product pick its own.

Usage Tracking

Monitor token usage and costs per product, per session. Know what you are spending.

Per-Product Config

Each CraftWorks product can have its own provider, model, and temperature settings.

Streaming Support

Stream responses token-by-token for real-time UI feedback. Works with all providers.

Structured Output

Request JSON responses with schema validation. Parse AI output directly into C# objects.

Supported providers

Pick the one that works for your project. Switch anytime.

OpenAI

  • GPT-4.1
  • GPT-4.1-mini

Anthropic

  • Claude Haiku 4.5
  • Claude Sonnet 4.5
  • Claude Opus 4

Google

  • Gemini 2.5 Flash
  • Gemini 2.5 Pro
  • Gemini 2.0 Flash

Custom

  • Any OpenAI-compatible endpoint
  • Ollama, LM Studio, etc.

For developers

CraftCore exposes a clean C# API. If you want to build your own AI-powered tools on top of it, you can.

// CraftCore API usage example
using CraftWorks.CraftCore;

async Task<string> GenerateDialogue(string prompt)
{
    var request = new ChatCompletionRequest
    {
        Model = CraftCoreSettings.DefaultModel,
        Messages = new[]
        {
            new Message(Role.System, "You are a dialogue writer."),
            new Message(Role.User, prompt)
        },
        Temperature = 0.8f,
        MaxTokens = 500
    };

    var response = await CraftCoreAPI.ChatCompletion(request);
    return response.Content;
}

Full API reference in the documentation.

Part of CraftWorks

CraftCore is bundled with DialogueCraft and will be included with future CraftWorks products. You get it automatically. It handles the AI plumbing so each product can focus on what it does best.