---
title: s.apiname
description: "## Syntax **s.apiname** ## Purpose The s.apiname annotation is used to tag a span element as being the name of an application programming interface (API). API names can include method or class names. This tag is generally applied to content…"
url: "https://www.stilo.com/docs/migrate/task/s-apiname/"
updated: "2023-12-11"
category: Annotations / Task
tags:
  - Annotations
---

# s.apiname

## Syntax

**s.apiname**

## Purpose

The s.apiname annotation is used to tag a span element as being the name of an application programming interface (API). API names can include method or class names. This tag is generally applied to content contained within a syntax diagram, but it can be applied outside of that context.

## Example

The following is an example of a time when you might want to use the annotation

![](https://www.stilo.com/wp-content/uploads/2023/12/stilo-dita-xml-annotation-s.apiname0.png)

 

The following is an example of a rule that will apply the annotation

![](https://www.stilo.com/wp-content/uploads/2023/12/stilo-dita-xml-annotation-s.apiname1.png)

The following is the DITA XML output for the rule:

<p>Use <apiname>image.aigen</apiname> to create an auto-generated image in the display pane.</p>
