---
title: 認証
description: サーバー側の API キーでリクエストを認証します。
canonical_url: https://orchestor.io/docs/creative/authentication
markdown_url: https://orchestor.io/docs/creative/authentication.md
contentType: guide
---

# 認証

ワークスペースの API キーでサーバーから接続します。キーの所属と権限は[組織とワークスペース](https://orchestor.io/docs/creative/account.md)で確認できます。

## 認証ヘッダー

```http
Authorization: Bearer YOUR_API_KEY
```

```bash
curl 'https://api.orchestor.io/v1/creative/jobs?limit=1' \
  --header "Authorization: Bearer $ORCHESTOR_API_KEY"
```

`x-api-key` ヘッダーも利用できます。`Authorization` と同時には送信しないでください。

## キーをサーバー側に保管する

> **サーバー側で接続する**
> 
> ブラウザーやモバイルアプリにキーを埋め込むと、第三者が取り出して利用できてしまいます。クライアントから直接 API を呼び出さないでください。

- シークレットストアや環境変数で管理し、開発用と本番用を分けます。
- URL、ログ、スクリーンショット、問い合わせ文には含めません。
- 漏えいが疑われる場合は、新しいキーへ交換し、古いキーを無効にします。

## 認証エラー

キーが不足・無効な場合は `401 Unauthorized` を返します。応答例です。

```json
{
  "error": {
    "code": "unauthorized",
    "message": "認証が必要です。有効な API キーと認証ヘッダーを確認してください。",
    "request_id": "req_00000000000000000000000000000000",
    "category": "authentication",
    "stage": "authentication",
    "retryable": false,
    "retry_after_seconds": null,
    "public_reason": "unauthorized",
    "next_action": "authenticate"
  }
}
```

認証と利用権限は別です。`403` はキーやワークスペースの権限を確認してください。同じ認証情報で繰り返し送信せず、[エラーと再試行](https://orchestor.io/docs/creative/errors.md)に従います。

## 関連ページ

- [よくある質問](https://orchestor.io/docs/creative/help/faq.md)
- [API の仕組み](https://orchestor.io/docs/creative/how-to/introduction.md)
- [GPT Image 2](https://orchestor.io/docs/creative/models/image/gpt-image-2.md)
- [Seedance 2.5](https://orchestor.io/docs/creative/models/video/seedance-2.5.md)

---

[Documentation index](https://orchestor.io/docs/llms.txt)
