Skip to main content
Sign in, create a key, add credits, and make your first call.

1. Create an API key

  1. Sign in at platform.particle.ai with Google.
  2. Open API keys and create a key. The raw bearer (pai-…) is shown once at creation — store it immediately; it cannot be retrieved later.
  3. Add credits under Billing. Inference requires a positive credit balance unless your key has free access.

2. Check your access

shell
response excerpt (two entries)
Use particle-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

shell

4. Use an OpenAI SDK

python

5. Point OpenCode at Particle

Particle is a qualified OpenCode provider. Minimal opencode.json: opencode.json
JSON mode, not schema-guaranteed outputresponse_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.