Use Spark from Studio

Spark speaks the OpenAI protocol, so Curiosity Studio can use it as an OpenAI compatible provider. The model runs on your own machines, and the prompts and the answers stay there.

This page covers the Spark side and the values Studio asks for. For the Studio side, see LLM configuration.

Before you start

  • Spark runs and has a model. Check with curl http://<spark host>:8080/v1/models -H "Authorization: Bearer <key>".
  • Studio can reach Spark's address. If Studio runs in a container started by the Orchestrator, use an address the container can reach: the Spark host's address, or the name of a container on the same Docker network. localhost inside a container is the container itself.
  • You created a key under API keys for Studio. Name it so the request log tells you who called.

Add the provider

In Studio, open Manage → AI → LLM Providers → Add provider → Custom (OpenAI-compatible) and enter:

Studio asks for Enter
Base URL http://<spark host>:8080/v1
API key The Spark key, starting with sk-spark-.
Model identifier A model id from GET /v1/models, for example smollm2-135m-instruct-q8_0, or an alias you set in Spark.

Choose Test, then open Spark's Requests page and look for the request from the Studio key.

Embeddings

Studio's External embedding mode talks to any OpenAI compatible /v1/embeddings endpoint. Spark serves it from an embedding model (bert, nomic-bert or gemma-embedding2). Add one under Discover, set the external provider URL to http://<spark host>:8080/v1 and the model to its id. The vectors Spark returns depend on the model, so rebuild the index after you change it. See built-in embedding models.

Things to plan for

  • One request at a time per model. Studio's chats and agents share the model. Concurrent requests queue.
  • Tool calls depend on the model. Studio's agents call tools. Use a model whose chat template supports tool calls, and test it.
  • Context. A prompt longer than the model's context is refused with 400. Raise the model's context in its settings, within what memory allows.
  • Zero retention. Create the key with Zero retention so Spark's request log keeps no prompts or answers from Studio. See Request log and zero retention.
  • Throughput. Spark on a CPU is slow for large models. Check the tokens per second on the Requests page before you point production traffic at it.

Use it from Studio on the same host

The Orchestrator and Spark can run on one machine. Run Spark with SPARK_PORT set, publish it on the host, and use the host's address from the workspaces, or put both on one Docker network and use Spark's container name.