Skip to main content

Base URL and authentication

Cloud keys are separate from device SDK keys. Never log a key or include one in client-side analytics. The console’s playground receives the endpoint and model from your signed-in session; production applications should keep the key server-side.

Models and pricing

Models are billed per million tokens against prepaid credits. Production Wally uses zero data retention for prompt and completion bodies. The current models and their rates are on console.runanywhere.ai, and refund terms cover how unused credits come back. Entitlement is per environment, so a key that works in development can get a 403 in production for the same model id. Treat the /models response for your own key as the authority on what you can call.

List models

The response follows the OpenAI list shape. Treat the returned IDs as the authority; do not hardcode a model that is absent from the current response.

Chat completions

The endpoint is OpenAI-compatible, so the official OpenAI clients work by pointing base_url at it. For Python, install the client with python3 -m pip install openai. Set RUNA_CLOUD_KEY in your environment to your cloud API key, then replace <model-id> with an ID returned by /models before running the example.

Body parameters

string
required
The model id to call. The /models response for your key is the authority on what is valid.
array
required
The conversation so far, in OpenAI’s {(role, content)} shape.
boolean
default:"false"
Send the reply as SSE chunks instead of one response.
number
Sampling temperature.
integer
Cap on tokens generated for this reply.
array
Tool definitions the model may call.
string | object
Which tool the model must use, if any.
object
Streaming extras, such as asking for a usage chunk.
The service may reject fields outside the current contract. Streaming sends JSON chunks after data: , optionally includes a usage chunk, and terminates with data: [DONE].

Errors and request IDs

Errors use the following safe shape; prompts, completions, and upstream bodies are not echoed:
Error responses carry x-request-id for support and usage correlation. The contract does not declare that header on successful responses, so do not depend on it there. Common statuses are 400 (invalid request), 401 (unknown key), 403 (not entitled), 429 (rate or capacity), 502 (engine failure), 503 (not ready), and 504 (upstream timeout). Capacity 429 responses may include Retry-After.