Octri

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:

LevelWhereExample
Per endpointSelect an endpoint in SDK StudioOne method retries 5 times
Per languageSettings whose key ends in ByLang, or outputByLangKotlin uses free functions
ProjectEverything elseEvery 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:

bash
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 stylechoicedefault: class
ValueStudio labelWhat callers write
classClass-basedA client they create, such as client.users.list()
functionsFunctionsFree functions they import, such as listUsers()

clientStyle · per language clientStyleByLang

Namespacechoicedefault: tags

How operations are grouped on the client.

ValueStudio labelGroups byExample
tagsTagsYour OpenAPI tagsclient.users.list()
pathPathURL path segmentsclient.api.users.list()
noneNoneNothing: every operation is top levelclient.listUsers()

namespace · per language namespaceByLang

Method namingchoicedefault: short

How a grouped operation's method is named. Only used when the namespace isn't none.

ValueStudio labelgetBalance tagged balance becomes
shortShortenedbalance.get(): the group's word isn't repeated
fullKeep full namebalance.getBalance(): the operation ID as written

methodNaming

Folder structurechoicedefault: tags

How the generated source files are laid out. It changes nothing a caller types.

ValueStudio labelLayout
tagsBy tagA folder per tag
pathBy pathA folder per URL path segment
flatFlatOne source folder

folderStructure

Endpoint foldersstructuredefault: none

Your own folders and order, set in the folder designer. They replace the automatic grouping for the endpoints you place.

endpointStructure

Authentication

Authentication schemechoice or listdefault: inherit

The credential the generated client takes. See authentication.

ValueThe client takes
inheritWhatever your project's API settings say, then your spec's security schemes, so the SDK and the docs playground always agree
noneNo credential
apiKeyAn API key, sent where your spec's apiKey scheme says
bearerA token, sent as Authorization: Bearer <token>
basicA username and password, which needs a basic scheme in your spec
oauth2An 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 URLURLdefault: your API settings, then the spec's first server

The 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 nametextdefault: your project's name plus sdk

The 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

Repositoryrepositorydefault: none

Your 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

READMEMarkdowndefault: generated

Replaces 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 languagedefault: none

Extra 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 languagedefault: per language

The library that makes requests, in the languages that offer a choice:

LanguageValuesDefault
TypeScriptfetch, axiosfetch
Kotlinokhttp, ktorokhttp

The other languages use their standard client. See the table below.

httpEngine, such as {"typescript": "axios"}

Data Model Frameworkchoicedefault: pydantic

Python only: what response models are.

ValueModels are
pydanticPydantic models, validated when parsed
dataclassStandard library dataclasses
typeddictTypedDict classes: responses stay plain dicts, typed for editors

style, such as {"python": "dataclass"}

Synchronous companionschoicedefault: per language

Adds 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 compatibilitychoicedefault: open

What the SDK does with an enum value your API added after it was built.

ValueThe SDK
openKeeps the unknown value, so old SDKs keep working
strictRejects it

enumStrategy

Generated unit testschoicedefault: include

Ships native tests derived from your schema in each package. omit leaves them out.

unitTests

File headerchoicedefault: include

The 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 offdefault: off

Ships 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 stylechoicedefault: per language
ValueA call looks like
objectlistUsers({ limit: 20, status: "active" })
positionallistUsers(20, "active")

TypeScript, Go and Java default to object. The other languages default to positional.

outputByLang.<language>.argumentStyle

SDK typechoicedefault: async

TypeScript: async returns Promises, and callback takes Node-style callbacks.

outputByLang.typescript.sdkType

SDK type (Kotlin)choicedefault: disabled

Kotlin: disabled generates blocking calls, and enabled generates suspend functions for coroutines.

outputByLang.kotlin.coroutines

Doc commentschoicedefault: full

full documents every method and field from your spec. minimal keeps comments short.

outputByLang.<language>.docComments

Usage examplechoicedefault: full

How long the generated samples are. full shows setup and the call, and concise shows the call alone.

outputByLang.<language>.usageExample

Defaults by language

LanguageArgumentsHTTP engineSync companions
TypeScriptobjectfetchomit
Pythonpositionalhttpxinclude
Goobjectnet/httpCalls already block
Javaobjectjava.net.httpCalls already block
KotlinpositionalokhttpCalls already block
PHPpositionalcURLCalls already block
RustpositionalureqCalls already block
RubypositionalNet::HTTPCalls already block
Dartpositionaldart:ioomit
SwiftpositionalURLSessionomit

Reliability

Retries and timeouts for every method. Each one is optional: what you leave out keeps the built-in. See retries and timeouts.

Max attemptsnumberdefault: 3

Total tries, including the first, from 1 to 10. 1 turns retries off.

reliability.maxAttempts

Base backoffmillisecondsdefault: 500

The wait before the first retry, from 0 to 120,000. Each later retry waits longer.

reliability.backoffMs

Max backoffmillisecondsdefault: 8000

The longest any one wait can be, from 0 to 600,000.

reliability.maxBackoffMs

Retry status codeslist of status codesdefault: 408, 425, 429, 500, 502, 503, 504

Which 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]

Timeoutmillisecondsdefault: 30000

How 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 offdefault: on

idempotency.enabled

Header nametextdefault: Idempotency-Key

The header the key is sent in, up to 128 characters.

idempotency.headerName

Methodslistdefault: POST, PATCH

Which methods get a key: any of POST, PUT, PATCH and DELETE.

idempotency.methods

Transforms

Spec transformslistdefault: none

Edits 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 nametextdefault: from the operation ID

The method's name. See client shape.

name

Doc commenttextdefault: from the docs page

The method's doc comment.

doc

Includedon or offdefault: on

Off leaves the endpoint out of every SDK, and out of your docs and MCP tools. See endpoint inclusion.

included

Paginationsettingsdefault: detected

How pages work for a list endpoint: strategy, items field, cursor field and the auto-paginate helper. See pagination.

pagination

Streamingsettingsdefault: detected

The stream format, sse, ndjson or chunked, and its event field. See streaming.

streaming

Reliabilitysettingsdefault: the project's

This method's retries and timeout, with the same fields as above.

reliability

Idempotencysettingsdefault: the project's

This method's key generation, with the same fields as above.

idempotency

Deprecationmessagedefault: not deprecated

Marks 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 offdefault: off

Marks 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 languagedefault: none

Your own code run before or after the request. See hooks.

hooks

Language overridessettings per languagedefault: none

Output 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.