Contents
To run CrewAI on SolCard Inference, build one LLM with custom_openai=True, base_url="https://api.solcardinference.ai/v1" and your sk-si- key, then pass it to every agent and to anything else that takes a model. That last part matters: agents, planning and memory each fall back to an OpenAI model when you don’t. Everything about CrewAI below comes from its own docs; we haven’t run it ourselves.
What you need
- A SolCard Inference API key. Make one on the dashboard’s API keys page. Keys start with
sk-si-and are shown once. - Some balance or a plan. One prepaid USD balance pays for every key and model; see how billing works.
- CrewAI. The LiteLLM extra isn’t needed for this route. CrewAI’s guide to running without LiteLLM says
custom_openai=True“forces CrewAI to use the native OpenAI SDK, regardless of the model name.”
pip install crewai
export SOLCARD_INFERENCE_KEY=sk-si-...
One LLM for the whole crew
CrewAI’s LLMs page gives a “Custom OpenAI-Compatible Endpoint” example with custom_openai=True, base_url and api_key. With our values and the context fix from the next section:
import os
from crewai import LLM, Agent, Crew, Task
llm = LLM(
model="solcard-inference-fast",
custom_openai=True,
base_url="https://api.solcardinference.ai/v1",
api_key=os.environ["SOLCARD_INFERENCE_KEY"],
context_window_size=1_000_000,
max_tokens=4096,
)
researcher = Agent(
role="Changelog reader",
goal="Find the breaking changes in a changelog",
backstory="You read release notes for a living.",
llm=llm,
)
task = Task(
description="List the breaking changes in: {changelog}",
expected_output="A bullet list, one change per line.",
agent=researcher,
)
crew = Crew(agents=[researcher], tasks=[task])
print(crew.kickoff(inputs={"changelog": "v2.0: removed the --legacy flag"}))
No openai/ prefix needed. The same guide says “An optional leading openai/ routing prefix is stripped,” and its own Groq example passes a bare model name.
Don’t rely on environment variables alone. The LLMs page lists OPENAI_BASE_URL as an optional custom base URL, but the LiteLLM removal guide warns: “Environment variables alone do not enable automatic routing for unknown models.” Our model names are unknown to CrewAI, so pass base_url in code.
Keep max_tokens at or under 32,768. That’s the most any of our models writes per request.
Set context_window_size, or get 8,192 tokens
This is the setting most likely to bite. The LLMs page says CrewAI looks each model up in a built-in catalog, and “If the catalog does not list your model, CrewAI assumes a default window (8,192 tokens for most providers) and logs a warning that names the model.” Our names won’t be in that catalog.
The fix is context_window_size, which the page says “takes priority over the catalog for every provider.” CrewAI then uses 85% of what you give it and keeps the rest as headroom. Use the model’s full window:
| Model | context_window_size |
|---|---|
solcard-inference-fast | 1_000_000 |
solcard-inference-large | 1_000_000 |
solcard-inference-base | 262_144 |
If you see that warning naming one of our models, this is the line that’s missing.
The defaults that still point at OpenAI
A crew has several places that pick a model, and each one has an OpenAI default. Cover all of them, or part of your crew’s traffic goes somewhere you didn’t plan:
- Agents. The agents page says
llm“Defaults to the model specified inOPENAI_MODEL_NAMEor “gpt-6-luna”.” Passllm=llmto every agent.function_calling_llmis a separate attribute for tool calls; leave it unset or set it to the same object. - Planning. The planning page says “Crew planning uses
gpt-6-lunaby default.” Withplanning=True, also passplanning_llm=llm. - Memory. The memory page says memory uses an LLM for save analysis and recall, with a default of gpt-6-luna, and that “By default,
Memory()uses OpenAItext-embedding-3-largeembeddings.”
Memory is the awkward one. You can hand it our model with Memory(llm=llm). The embedder is a different matter: our three models generate text, and none of them is an embedding model. Turning on memory=True means picking an embedding provider and accepting that your crew’s memories are sent to it. If the point of using us is that nothing is kept, leave memory off or run a local embedder. The memory page says stored memories sit in LanceDB under ./.crewai/memory on your own disk.
Telemetry and share_crew
CrewAI’s telemetry is separate from your model traffic. Its telemetry page says “NO personal data is collected concerning prompts, task descriptions, agents’ backstories or goals” by default. The opt-in share_crew setting is different: it “results in the collection of detailed crew and task execution data,” including task outputs.
To turn telemetry off, the page says to set CREWAI_DISABLE_TELEMETRY to true. Tracing is separate again: use CREWAI_TRACING_ENABLED=false or tracing=False on the crew. Keep share_crew off if your tasks contain anything you wouldn’t send to a third party.
Reasoning, cost and rate limits
CrewAI’s LLM takes reasoning_effort directly. Per our reasoning guide, Chat Completions accepts none, low, medium or high, reasoning is off by default, and solcard-inference-large always reasons. Reasoning tokens bill as output.
A crew makes many requests. The agents page says max_iter defaults to 20 iterations per agent before it must give its best answer, and every iteration is a call. Say a three-agent crew makes 12 requests, each sending 3,000 tokens and getting 500 back. That’s about $0.06 on Fast and about $0.17 on Large plus its reasoning, before any cached-input discount. Lower max_iter to cap a runaway agent.
On a plan, the per-minute limit is 120 requests on Starter, 300 on Pro and 600 on Max. The agent attribute max_rpm throttles requests per minute if a big crew runs into it. Each agent can take its own LLM, so one split is Large for the agent that plans or reviews and Fast for the ones that fetch and summarize; Fast, Large or Base has more on choosing.
Check it works
Rule out CrewAI first: if this curl fails, the problem is the key or the URL.
curl https://api.solcardinference.ai/v1/models \
-H "Authorization: Bearer $SOLCARD_INFERENCE_KEY"
The list should name solcard-inference-fast, -large and -base. Then run the example above. Codes you may see, from our errors page:
- 401
invalid_api_key: the key is missing, revoked or unknown. - 400
model_not_found: use the full id, such assolcard-inference-fast. - 402
insufficient_balance: top up, then retry. - 429
rate_limitedorplan_limit_reached: too many requests a minute, or the plan’s weekly limit is used up.
FAQ
Do I need crewai[litellm]?
Not for this setup. custom_openai=True uses CrewAI’s native OpenAI client, and the LiteLLM removal guide says “If you only use native providers, you never need to install crewai[litellm].”
What does the unknown-model warning mean?
CrewAI didn’t find our model in its catalog and fell back to an 8,192-token window. Set context_window_size on the LLM.
Can I use the Responses API?
CrewAI’s LLM has an api setting, with "completions" as the default. Our API supports Responses but stores nothing and rejects store: true, so Chat Completions is the simpler route here.
Are my prompts stored?
Not by us: prompts and responses are never logged or stored. Keeps nothing follows one request through. Memory and share_crew are CrewAI features that can send data elsewhere, which is why the sections above say to configure them.
What about LangChain or the OpenAI Agents SDK? See the LangChain guide and the Agents SDK guide.