1. Create an API key
- Sign in at platform.particle.ai with Google.
- Open API keys and create a key. The raw bearer (
pai-…) is shown once at creation — store it immediately; it cannot be retrieved later. - Add credits under Billing. Inference requires a positive credit balance unless your key has free access.
2. Check your access
shellparticle-1 to get started. This request alias selects particle-ai/particle-1, the public ID listed above and returned in responses. Other models depend on service availability; see the model catalog.
3. First chat completion
shell4. Use an OpenAI SDK
python5. Point OpenCode at Particle
Particle is a qualified OpenCode provider. Minimalopencode.json:
opencode.json
JSON mode, not schema-guaranteed output
response_format: {"type": "json_object"} is accepted on all models (the top-level value may be an object or array). Caller-supplied json_schema is accepted and reduced to the engine-enforced subset. Schema-constrained decoding is not advertised as a qualified capability — treat output as best-effort JSON. See Structured outputs.Next steps
- LiteLLM — use Particle from the Python SDK or add it to your LiteLLM proxy.
- Mid-turn steering — copy a runnable Python or Node.js example to let users redirect a running agent. Includes an integration brief for coding agents.
- Responses WebSocket API — exact fields, events, tool results, and compatibility limits. This is separate from HTTP Chat streaming.
- Authentication — scopes, key lifecycle, error shapes.
- Reasoning controls — the effort ladder and what it costs.
- Prompt caching — cut multi-turn input cost and latency.
- Service tiers — control queueing priority under load.