# net.atpix.gallery.createPhoto

> Published by [lexicon.atpix.net](https://lexicon.garden/identity/did:plc:x4crpdfko2d7xrcd5eovpwex)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:x4crpdfko2d7xrcd5eovpwex/net.atpix.gallery.createPhoto)
- [Documentation](https://lexicon.garden/lexicon/did:plc:x4crpdfko2d7xrcd5eovpwex/net.atpix.gallery.createPhoto/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:x4crpdfko2d7xrcd5eovpwex/net.atpix.gallery.createPhoto/examples)

## Definitions

### `net.atpix.gallery.createPhoto`

**Type**: `procedure`

Create a photo record after blob upload. Writes to public repo or permissioned space per visibility.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `image` | `blob` | Yes |  |
| `title` | `string` | No |  |
| `width` | `integer` | No |  |
| `height` | `integer` | No |  |
| `source` | `string` (at-uri) | No |  |
| `caption` | `string` | No |  |
| `license` | `string` (uri) | No |  |
| `keywords` | `array` | No |  |
| `spaceUri` | `string` | No |  |
| `albumUris` | `array` | No |  |
| `thumbnail` | `blob` | No |  |
| `inLanguage` | `string` | No |  |
| `visibility` | `ref` → `net.atpix.gallery.defs#visibility` | Yes |  |
| `contributor` | `string` (did) | No |  |
| `description` | `string` | No |  |
| `copyrightHolder` | `string` (did) | No |  |
| `locationCreated` | `ref` → `net.atpix.gallery.defs#geoPlace` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |

## Raw Schema

```json
{
  "id": "net.atpix.gallery.createPhoto",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "image",
            "visibility"
          ],
          "properties": {
            "image": {
              "type": "blob",
              "accept": [
                "image/*"
              ]
            },
            "title": {
              "type": "string",
              "maxLength": 500
            },
            "width": {
              "type": "integer",
              "minimum": 1
            },
            "height": {
              "type": "integer",
              "minimum": 1
            },
            "source": {
              "type": "string",
              "format": "at-uri"
            },
            "caption": {
              "type": "string",
              "maxLength": 2000
            },
            "license": {
              "type": "string",
              "format": "uri"
            },
            "keywords": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 64
              },
              "maxLength": 50
            },
            "spaceUri": {
              "type": "string",
              "maxLength": 512
            },
            "albumUris": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "at-uri"
              },
              "maxLength": 100
            },
            "thumbnail": {
              "type": "blob",
              "accept": [
                "image/*"
              ]
            },
            "inLanguage": {
              "type": "string",
              "maxLength": 35
            },
            "visibility": {
              "ref": "net.atpix.gallery.defs#visibility",
              "type": "ref"
            },
            "contributor": {
              "type": "string",
              "format": "did"
            },
            "description": {
              "type": "string",
              "maxLength": 5000
            },
            "copyrightHolder": {
              "type": "string",
              "format": "did"
            },
            "locationCreated": {
              "ref": "net.atpix.gallery.defs#geoPlace",
              "type": "ref"
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cid"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid"
            },
            "uri": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Create a photo record after blob upload. Writes to public repo or permissioned space per visibility."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
