Settings reference
This is every SDK setting: its label in SDK Studio, its key, its values and its default. Change them in SDK Studio, from the CLI with octri sdk settings set and the key shown here, or for some of them in your spec.
In SDK Studio, changes are drafts until you publish. octri sdk settings set publishes as it saves. Either way, they reach your packages with the next build.
How settings layer
A setting can be set at up to three levels. The narrowest one wins:
| Level | Where | Example |
|---|---|---|
| Per endpoint | Select an endpoint in SDK Studio | One method retries 5 times |
| Per language | Settings whose key ends in ByLang, or outputByLang | Kotlin uses free functions |
| Project | Everything else | Every SDK retries 3 times |
From the CLI, a key with a dot sets one field inside another and keeps the fields beside it. A value starting with { or [ is read as JSON, and replaces the whole key:
octri sdk settings set reliability.maxAttempts 5
octri sdk settings set clientStyleByLang.go functions
octri sdk settings set reliability.retryOn '[429, 503]'Client shape
How a caller reaches your operations. See client shape, where each option is shown in generated code.
Client stylechoice| Value | Studio label | What callers write |
|---|---|---|
class | Class-based | A client they create, such as client.users.list() |
functions | Functions | Free functions they import, such as listUsers() |
clientStyle · per language clientStyleByLang
NamespacechoiceHow operations are grouped on the client.
| Value | Studio label | Groups by | Example |
|---|---|---|---|
tags | Tags | Your OpenAPI tags | client.users.list() |
path | Path | URL path segments | client.api.users.list() |
none | None | Nothing: every operation is top level | client.listUsers() |
namespace · per language namespaceByLang
Method namingchoiceHow a grouped operation's method is named. Only used when the namespace isn't none.
| Value | Studio label | getBalance tagged balance becomes |
|---|---|---|
short | Shortened | balance.get(): the group's word isn't repeated |
full | Keep full name | balance.getBalance(): the operation ID as written |
methodNaming
Folder structurechoiceHow the generated source files are laid out. It changes nothing a caller types.
| Value | Studio label | Layout |
|---|---|---|
tags | By tag | A folder per tag |
path | By path | A folder per URL path segment |
flat | Flat | One source folder |
folderStructure
Endpoint foldersstructureYour own folders and order, set in the folder designer. They replace the automatic grouping for the endpoints you place.
endpointStructure
Authentication
Authentication schemechoice or listThe credential the generated client takes. See authentication.
| Value | The client takes |
|---|---|
inherit | Whatever your project's API settings say, then your spec's security schemes, so the SDK and the docs playground always agree |
none | No credential |
apiKey | An API key, sent where your spec's apiKey scheme says |
bearer | A token, sent as Authorization: Bearer <token> |
basic | A username and password, which needs a basic scheme in your spec |
oauth2 | An OAuth 2 token, or it runs the flow itself |
A list, such as ["apiKey", "bearer"], makes the client accept any of them. inherit and none can't be combined. In SDK Studio, inherit is labelled Project default.
auth
Base URLURLThe address the client calls unless the caller passes another. SDK Studio fills it in from your spec's servers.
baseUrl
Package
See publishing for how names reach each registry.
Package nametextThe name every SDK is published under, and its imports. Java and Kotlin need a dotted name, such as com.acme.api, and no part of it may start with a digit.
packageName · per language packageNameByLang
RepositoryrepositoryYour source repository, written into each package's metadata. Usually each language has its own. For Go it's also the module's import path.
repositoryUrl · per language repositoryUrlByLang
READMEMarkdownReplaces the generated README in every package. With a GitHub repository linked, it's kept in step with the repository's README. See README and samples.
readme
Hook packagespackages per languageExtra dependencies your hooks import, such as "zod@^3", added to each package's manifest.
hookPackages, such as {"typescript": ["zod@^3"]}
Output
What the generated code looks like and what ships with it. See output options.
HTTP enginechoice per languageThe library that makes requests, in the languages that offer a choice:
| Language | Values | Default |
|---|---|---|
| TypeScript | fetch, axios | fetch |
| Kotlin | okhttp, ktor | okhttp |
The other languages use their standard client. See the table below.
httpEngine, such as {"typescript": "axios"}
Data Model FrameworkchoicePython only: what response models are.
| Value | Models are |
|---|---|
pydantic | Pydantic models, validated when parsed |
dataclass | Standard library dataclasses |
typeddict | TypedDict classes: responses stay plain dicts, typed for editors |
style, such as {"python": "dataclass"}
Synchronous companionschoiceAdds synchronous versions of every method, beside the asynchronous ones. Python includes them by default, and the other languages leave them out. It changes the package in TypeScript, Python, Dart and Swift. In the other languages, calls already block.
syncMethods: include or omit
Enum compatibilitychoiceWhat the SDK does with an enum value your API added after it was built.
| Value | The SDK |
|---|---|
open | Keeps the unknown value, so old SDKs keep working |
strict | Rejects it |
enumStrategy
Generated unit testschoiceShips native tests derived from your schema in each package. omit leaves them out.
unitTests
File headerchoiceThe DO NOT EDIT banner at the top of every generated file. Only the Enterprise plan can turn it off. On other plans a build with omit is refused.
fileHeader
Generate a CLIon or offShips a command-line interface in the SDK, with a subcommand per operation. See generated CLI.
cli: true or false
Per language output
Set for one language at a time, under outputByLang, such as {"go": {"argumentStyle": "positional"}}.
Argument stylechoice| Value | A call looks like |
|---|---|
object | listUsers({ limit: 20, status: "active" }) |
positional | listUsers(20, "active") |
TypeScript, Go and Java default to object. The other languages default to positional.
outputByLang.<language>.argumentStyle
SDK typechoiceTypeScript: async returns Promises, and callback takes Node-style callbacks.
outputByLang.typescript.sdkType
SDK type (Kotlin)choiceKotlin: disabled generates blocking calls, and enabled generates suspend functions for coroutines.
outputByLang.kotlin.coroutines
Doc commentschoicefull documents every method and field from your spec. minimal keeps comments short.
outputByLang.<language>.docComments
Usage examplechoiceHow long the generated samples are. full shows setup and the call, and concise shows the call alone.
outputByLang.<language>.usageExample
Defaults by language
| Language | Arguments | HTTP engine | Sync companions |
|---|---|---|---|
| TypeScript | object | fetch | omit |
| Python | positional | httpx | include |
| Go | object | net/ | Calls already block |
| Java | object | java.net.http | Calls already block |
| Kotlin | positional | okhttp | Calls already block |
| PHP | positional | cURL | Calls already block |
| Rust | positional | ureq | Calls already block |
| Ruby | positional | Net::HTTP | Calls already block |
| Dart | positional | dart:io | omit |
| Swift | positional | URLSession | omit |
Reliability
Retries and timeouts for every method. Each one is optional: what you leave out keeps the built-in. See retries and timeouts.
Max attemptsnumberTotal tries, including the first, from 1 to 10. 1 turns retries off.
reliability.maxAttempts
Base backoffmillisecondsThe wait before the first retry, from 0 to 120,000. Each later retry waits longer.
reliability.backoffMs
Max backoffmillisecondsThe longest any one wait can be, from 0 to 600,000.
reliability.maxBackoffMs
Retry status codeslist of status codesWhich responses can be retried. A POST or PATCH is only retried on 429 or 503, whatever the list says, and after a network error only when your spec declares an idempotency header. See what gets retried.
reliability.retryOn, such as [429, 503]
TimeoutmillisecondsHow long one attempt may take, up to 600,000. 0 keeps the default.
reliability.timeoutMs
Idempotency
A key sent with writes, so a retried request isn't applied twice. See idempotency.
Generate an idempotency keyon or offidempotency.enabled
Header nametextThe header the key is sent in, up to 128 characters.
idempotency.headerName
MethodslistWhich methods get a key: any of POST, PUT, PATCH and DELETE.
idempotency.methods
Transforms
Spec transformslistEdits applied to your spec before generation, each a command (update, append, merge, remove, move or copy) with its args and an optional reason. See spec transforms.
transforms
Per endpoint
Select an endpoint in SDK Studio to change it for one method. Each overrides the project setting above it.
Function nametextThe method's name. See client shape.
name
Doc commenttextThe method's doc comment.
doc
Includedon or offOff leaves the endpoint out of every SDK, and out of your docs and MCP tools. See endpoint inclusion.
included
PaginationsettingsHow pages work for a list endpoint: strategy, items field, cursor field and the auto-paginate helper. See pagination.
pagination
StreamingsettingsThe stream format, sse, ndjson or chunked, and its event field. See streaming.
streaming
ReliabilitysettingsThis method's retries and timeout, with the same fields as above.
reliability
IdempotencysettingsThis method's key generation, with the same fields as above.
idempotency
DeprecationmessageMarks the method deprecated in every SDK, with an optional message saying what to use instead. See versioning.
deprecation, such as {"message": "Use listCustomersV2"}
Quickstarton or offMarks this as the example every README leads with. With none marked, the generator picks one. See README and samples.
quickstart · CLI octri sdk quickstart set
Hookscode per languageYour own code run before or after the request. See hooks.
hooks
Language overridessettings per languageOutput options for this method in one language, such as its Pagination style in TypeScript: generator returns an AsyncGenerator of items, and paginator returns a Paginator with explicit page navigation.
byLang, such as {"python": {"paginationStyle": "paginator"}}
Setting these in your spec
Many of these can live in your OpenAPI document instead, so they travel with it. See spec extensions.
Related
octri sdk settings: read and change these from a terminal.- Client shape: each shape option in generated code.
- Output options: engines, models and what ships in the package.