# ogen > ogen is an Apache-2.0 OpenAPI v3 code generator for Go, maintained by the > ogen-go organization. It reads an OpenAPI v3 document at build time and emits > a statically typed Go client and server — code-generated JSON encoding (no > reflection, no `interface{}`), code-generated validators, a static radix > router, sum types for `oneOf`, `Opt`/`Nil`/`OptNil` wrappers instead of > pointers, a typed `SecuritySource` interface, webhook client and server > generation, Server-Sent Events client generation, and OpenTelemetry tracing > and metrics. ogen operates no hosted API: there is no base URL, no > authentication, no rate limit and no pricing. Its machine-readable contract is > the published JSON Schema for its own configuration file. Generated by API Evangelist on 2026-08-06 from ogen's public documentation, repositories and package registries. This is an independent third-party profile. ## Start here - [Getting started](https://ogen.dev/docs/intro): install, `go:generate` wiring, first client and server - [Features](https://ogen.dev/docs/features): what the generator emits and the one documented incompatibility - [Configuration](https://ogen.dev/docs/config): the `parser` and `generator` sections, feature resolution, filters - [Specification extensions](https://ogen.dev/docs/spec/extensions): the documented `x-ogen-*` terms - [FAQ](https://ogen.dev/docs/faq): 404 handler, error handler, `net/http` middleware - [Examples](https://ogen.dev/docs/examples): optional/nullable handling, sum types, real-world specs - [Go reference](https://pkg.go.dev/github.com/ogen-go/ogen): the package API ## Machine-readable contracts - [Configuration JSON Schema (draft-07)](https://raw.githubusercontent.com/ogen-go/ogen/main/schemas/ogen.jsonschema.json) - [Configuration JSON Schema source (YAML)](https://raw.githubusercontent.com/ogen-go/ogen/main/schemas/ogen.jsonschema.yml) - [Full reference config](https://github.com/ogen-go/ogen/blob/main/examples/config/example_all.yml) - [Default config](https://github.com/ogen-go/ogen/blob/main/examples/config/default_all.yml) - [Feature list](https://github.com/ogen-go/ogen/blob/main/gen/features.go) ## Install - Go tool directive (Go 1.24+, pins the version): `go get -tool github.com/ogen-go/ogen/cmd/ogen@latest` - Go install: `go install -v github.com/ogen-go/ogen/cmd/ogen@latest` - [Container image](https://github.com/ogen-go/ogen/pkgs/container/ogen): `ghcr.io/ogen-go/ogen:latest` ## Try it - [OpenAPI validator](https://ogen.dev/docs/validator): the real ogen parser compiled to WebAssembly, runs entirely in the browser, no signup - [Sample project](https://github.com/ogen-go/example): runnable client, server and OpenTelemetry integration - [Petstore starter spec](https://raw.githubusercontent.com/ogen-go/web/main/examples/petstore.yml) ## Source and releases - [ogen-go/ogen](https://github.com/ogen-go/ogen): the generator (Apache-2.0) - [Releases](https://github.com/ogen-go/ogen/releases): semver, notes per tag, compare links - [ogen-go/web](https://github.com/ogen-go/web): the ogen.dev documentation site - [ogen-go/example](https://github.com/ogen-go/example): sample project - [ogen-go/protoc-gen-oas](https://github.com/ogen-go/protoc-gen-oas): generate OpenAPI v3 from protobuf - [ogen-go/ent2ogen](https://github.com/ogen-go/ent2ogen): ent schema to ogen - [ogen-go/schemacompiler](https://github.com/ogen-go/schemacompiler): compile JSON Schema Draft 2020-12 for Go codegen ## Support and security - [Issues](https://github.com/ogen-go/ogen/issues) - [Discussions](https://github.com/ogen-go/ogen/discussions) - [Telegram @ogen_dev](https://t.me/ogen_dev) - [Contributing](https://github.com/ogen-go/ogen/blob/main/CONTRIBUTING.md) - [Security policy](https://github.com/ogen-go/ogen/blob/main/SECURITY.md): report privately via GitHub Security Advisories ## API Evangelist profile artifacts - [apis.yml](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/apis.yml) - [Packages](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/packages/ogen-packages.yml) - [CLI surface](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/cli/ogen-cli.yml) - [Config JSON Schema](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/json-schema/ogen-config.jsonschema.json) - [Extension vocabulary](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/vocabulary/ogen-extensions.yml) - [Conformance](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/conformance/ogen-conformance.yml) - [Lifecycle](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/lifecycle/ogen-lifecycle.yml) - [Changelog](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/changelog/ogen-changelog.yml) - [Sandbox](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/sandbox/ogen-sandbox.yml) - [Vulnerability disclosure](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/security/ogen-vulnerability-disclosure.yml) - [Agent skills](https://raw.githubusercontent.com/api-evangelist/ogen/refs/heads/main/skills/_index.yml) ## Notes for agents - There is nothing to call. ogen is invoked as a command against a local OpenAPI file; do not attempt to construct HTTP requests to ogen.dev. - Version acceptance matters: whether a document generates depends on the pinned ogen version. Report it with any verdict. - OpenAPI 3.1 support is partial. See the conformance artifact before declaring a 3.1 document invalid. - `duration` maps to Go `time.Duration`, not the RFC 3339 duration JSON Schema defines. This divergence is documented by the project.