CNI Specification

The CNI specification defines the interface between container runtimes and network plugins. It specifies how runtimes invoke plugins via environment variables (CNI_COMMAND, CNI_CONTAINERID, CNI_NETNS, CNI_IFNAME, CNI_PATH, CNI_ARGS) and stdin configuration, and how plugins respond on stdout with network interface details. The spec covers ADD, DEL, CHECK, and VERSION operations for managing container network attachments, and defines the plugin chaining model used by meta-plugins.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cni-spec"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

API entry from apis.yml

apis.yml Raw ↑
aid: cni:cni-spec
name: CNI Specification
description: The CNI specification defines the interface between container runtimes and network plugins.
  It specifies how runtimes invoke plugins via environment variables (CNI_COMMAND, CNI_CONTAINERID, CNI_NETNS,
  CNI_IFNAME, CNI_PATH, CNI_ARGS) and stdin configuration, and how plugins respond on stdout with network
  interface details. The spec covers ADD, DEL, CHECK, and VERSION operations for managing container network
  attachments, and defines the plugin chaining model used by meta-plugins.
humanURL: https://www.cni.dev/docs/spec/
properties:
- type: Documentation
  url: https://www.cni.dev/docs/spec/
- type: GitHubRepository
  url: https://github.com/containernetworking/cni
- type: JSONSchema
  url: json-schema/cni-network-config-schema.json
- type: JSONSchema
  url: json-schema/cni-result-schema.json
- type: JSONLDContext
  url: json-ld/cni-context.jsonld
tags:
- Network Plugins
- Specification
x-features:
- name: ADD operation
  description: Attach a container to a network and return a Result document with assigned interfaces,
    IPs, routes, and DNS.
- name: DEL operation
  description: Detach a container from a network and tear down allocated resources.
- name: CHECK operation
  description: Verify the container's current attachment matches the prior ADD result.
- name: VERSION operation
  description: Report the CNI spec versions a plugin supports.
- name: Plugin Chaining
  description: Meta-plugin chaining model where a chain shares previous Result via prevResult.
- name: Network Config Schema
  description: Schema for the JSON document that describes a network and its plugin chain.
- name: Result Schema
  description: Schema for the Result document that plugins emit on stdout.
x-useCases:
- name: Kubernetes CNI Plugin
  description: Implement a CNI plugin that integrates with Kubernetes / containerd / CRI-O.
- name: Network Validation
  description: Validate network configurations and plugin Result documents against the spec.
- name: Custom SDN
  description: Build custom software-defined networks for containers using a portable plugin contract.