Skip to main content
Get your first answer from ARC using the Generation API. Send a prompt; Rayline chooses the model and reasoning level, runs it, and returns the answer. You need a Rayline workspace and API key.

Choose a tier

This quickstart uses Swift, arc-swift-1.0, for everyday work. You can switch to Sage, arc-sage-1.0, for demanding tasks. Both are presets for ARC.
Zero data retention requires sales approval. If your workspace is already approved and configured for it, use arc-swift-zdr-1.0 in this example. See data and privacy.
1

Get a key

Complete your workspace setup in Rayline Platform, then create a key in API Keys. Copy it into an environment variable, outside your source code:
2

Check your balance

Check that the workspace owning your key has an available API balance. Complete any funding setup shown in Rayline Platform before sending the request. An insufficient balance returns 402 (billing_error). See funding and billing.
3

Send a request

The response contains an assistant message in content, explaining what a regression test does. The exact wording varies. Receiving that answer means Rayline has completed both selection and generation.
4

Inspect the request

Open usage in the workspace owning your key. Find the request and check its status, token usage, and recorded charge. Swift uses its fixed token rates whichever model served the answer; see pricing.

Continue from your first answer

Use the same x-conversation-id for later turns of this conversation and a new ID for a new conversation. For request fields and other formats, see the Generation API reference. Production supports Messages and Chat Completions; direct OpenAI Responses requires an environment that advertises Responses support. To use ARC in an existing app, follow your tool’s guide. To run the selected model yourself, continue with the Routes API.
The Routes API stops after selection. This request returns the model and reasoning configuration for your application to run:
Read model and thinking from the response. Together, they describe your route. Use it to run the selected model and get an answer through your own providers or infrastructure. Follow the Routes guide for that handoff.