Importing Custom SDK
Custom SDK Import surfaces your own SDK’s code samples in the docs, via x-theneo-endpoint-metadata.
Import your custom SDK
1
Prepare your OpenAPI specification
Ensure your OpenAPI spec is up to date and reflects the endpoints you want to document.
2
Add custom SDK metadata
Add the x-theneo-endpoint-metadata field to the endpoints where you want your custom SDK, including code examples for each supported language. You can also check out this full sample spec.
"x-theneo-endpoint-metadata": {
"examples": [
{
"title": "Create a Pet",
"request": {
"python": "from swagger_petstore_sdk import PetstoreClient\n\n# Python\nclient = PetstoreClient()\nnew_pet = {'name': 'NewPet', 'tag': 'Tag123'}\nresponse = client.create_pet(new_pet)\nprint(response.status_code)",
"javascript": "import { PetstoreClient } from 'swagger-petstore-sdk';\n\n// JavaScript\nconst client = new PetstoreClient();\nconst newPet = { name: 'NewPet', tag: 'Tag123' };\nconst response = await client.createPet(newPet);\nconsole.log(response.status)"
}
}
]
}
3
Import the spec into Theneo
Import your updated OpenAPI spec. Theneo reads x-theneo-endpoint-metadata and populates the SDK selection dropdown with your custom options.
Supported languages
Theneo currently supports importing SDK examples in these languages:

cURL

Python

JavaScript

Go

Java

C#

PHP

Ruby

GraphQL
More languages are on the way — keep an eye on platform updates.
Requirements & limitations
- OpenAPI specification — your API must have an OpenAPI spec to use this feature.
- Endpoint metadata — the
x-theneo-endpoint-metadatafield is required for Theneo to recognize and import the SDK. - Editor limitation —
x-theneo-endpoint-metadatacannot currently be edited inside the Theneo editor; make these changes in the spec file before importing.
Generate client SDKs
Don’t have an SDK yet? Theneo partners with liblab to generate fully-featured client SDKs straight from your API spec — so you can hand your users ready-to-use libraries in multiple languages, then surface their code samples in your docs with the metadata above.
Prefer a different toolchain: Speakeasy, Stainless, Fern, or your own generator? That works too: produce your SDKs however you like, then embed their examples in Theneo via x-theneo-endpoint-metadata.
Interested in SDK generation with liblab? Reach out to hello@theneo.io and we’ll help you get set up.
On this page
- Importing Custom SDK